Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Single Docker - use Terrarium public image #31

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docker_scripts/functions
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,6 @@ run_frontend() {
run_terrarium() {
cd /usr/src/app
echo "Starting Terrarium..."
pm2 start node -- index.js
pm2 start node -- /usr/bin/ts-node -- src/index.ts
echo "Terrarium started..."
}
8 changes: 5 additions & 3 deletions standalone.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
FROM ghcr.io/cohere-ai/terrarium:latest as terrarium

FROM buildpack-deps:buster
LABEL authors="Cohere"

## set ENV for python
ENV PYTHON_VERSION=3.11.8
ENV PYTHONDONTWRITEBYTECODE=1
Expand Down Expand Up @@ -103,10 +104,11 @@ RUN pnpm install

# Terrarium
WORKDIR /usr/src/app
COPY src/terrarium/package*.json ./
RUN npm install -g ts-node
COPY --from=terrarium /usr/src/app/package*.json ./
RUN npm install
RUN npm prune --production
COPY src/terrarium/. .
COPY --from=terrarium /usr/src/app/. .
ENV ENV_RUN_AS "docker"

# Ports to expose
Expand Down