Skip to content

Commit

Permalink
Merge branch 'master' into fix_setup_instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
wittrock committed Aug 25, 2024
2 parents c608ab7 + 0ac63c1 commit 28179c9
Show file tree
Hide file tree
Showing 7 changed files with 240 additions and 26 deletions.
12 changes: 11 additions & 1 deletion build/cdc/dev/Dockerfile.nl-python.cdc.dev
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,15 @@
# limitations under the License.

# Development Dockerfile for Custom Data Commons NL server
# Stage 1: Download base dc model from GCS.
FROM google/cloud-sdk:slim as model-downloader

# Use official Python runtime as a parent image
# Download NL embeddings model
RUN mkdir -p /tmp/datcom-nl-models \
&& gsutil -m cp -R gs://datcom-nl-models/ft_final_v20230717230459.all-MiniLM-L6-v2/ /tmp/datcom-nl-models/ \
&& gsutil cp -R gs://datcom-nl-models/embeddings_medium_2024_05_09_18_01_32.ft_final_v20230717230459.all-MiniLM-L6-v2.csv /tmp/datcom-nl-models/

# Stage 2: Use official Python runtime image
FROM python:3.11.4-slim

# Set the working directory in the container
Expand All @@ -41,6 +48,9 @@ COPY deploy/. /app/deploy/
# Copy the NL application start script into the container
COPY run_nl_server.sh /app/run_nl_server.sh

# Copy NL embeddings model from model-downloader
COPY --from=model-downloader /tmp/datcom-nl-models /tmp/datcom-nl-models

# Copy the NL application start script into the container
COPY nl_app.py /app/nl_app.py

Expand Down
1 change: 1 addition & 0 deletions build/cdc_services/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ FROM gcr.io/datcom-ci/datacommons-services-runtime:2024-08-08 as runner
# Env defaults.
ENV WEBSITE_MIXER_API_ROOT=http://127.0.0.1:8081 \
ENV_PREFIX=Compose \
FLASK_ENV=custom \
ENABLE_ADMIN=false \
DEBUG=false \
USE_SQLITE=false \
Expand Down
12 changes: 12 additions & 0 deletions tools/apigee/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,18 @@ To migrate keys in prod env:

To migrate keys in staging env:

```bash
./run.sh staging.env
```

To only export keys (i.e. fetch DC api keys and write to the spreadsheet) in staging env:

```bash
./run.sh staging.env
```

To only import keys (i.e. export keys from the spreadsheet to apigee) in staging env:

```bash
./run.sh staging.env
```
Loading

0 comments on commit 28179c9

Please sign in to comment.