Skip to content

Commit

Permalink
Fixing requirements and udpating README
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanMullins committed Oct 11, 2024
1 parent 64114d5 commit 1d019c7
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lit_nlp/examples/gcp/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ COPY ./lit_nlp/examples/gcp/model_server_gunicorn_config.py ./
# TODO(b/353980272): Replace this with a requirements file specific to the GCP
# exmaple, this should include the core lit-nlp package.
COPY requirements_core.txt ./
COPY lit_nlp/examples/prompt_debugging/requirements.txt \
lit_nlp/examples/prompt_debugging/requirements.txt
COPY lit_nlp/examples/gcp/requirements.txt lit_nlp/examples/gcp/requirements.txt
RUN python -m pip install -r lit_nlp/examples/gcp/requirements.txt

Expand Down
30 changes: 30 additions & 0 deletions lit_nlp/examples/gcp/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,35 @@
# Using LLMs in LIT on Google Cloud Platform

## Developing

### Use a virtual environment

```shell
# Create and activate the virtual environment
python3 -m venv ~/.venvs/lit-on-gcp
source ~/.venvs/lit-on-gcp/bin/activate

# Install the requirements and LIT in editable mode
pip install -f ./lit_nlp/examples/gcp/requirements.txt
pip install -e .

# Optionally, install tetsing requirements
pip install -f ./requirements_test.txt
```

### Build the Docker image

```shell
docker build -f ./lit_nlp/examples/gcp/Dockerfile -t lit-app:gcp-dev .
```

### Run GPT-2 in a Docker container

```shell
# Runs GPT-2 in Keras on Tensorflow
docker run --rm -p 5432:5432 -e MODEL_CONFIG=gpt2:gpt2_base_en lit-app:gcp-dev
```

Architectural Notes

* The `LitApp` HTTP API assumes that inputs will be passed around as
Expand Down
1 change: 1 addition & 0 deletions lit_nlp/examples/gcp/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
# ==============================================================================

-r ../../../requirements_core.txt
-r ../prompt_debugging/requirements.txt

google-cloud-aiplatform>=1.60.0
gunicorn>=20.1.0
Expand Down

0 comments on commit 1d019c7

Please sign in to comment.