Skip to content

Commit

Permalink
dockerfile improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
vemonet committed Dec 12, 2022
1 parent d549c79 commit 362ac50
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ WORKDIR /app
RUN apt-get update && \
apt-get install -y build-essential wget curl vim openjdk-11-jdk && \
pip install --upgrade pip
# pip-tools


## Install Spark for standalone context in /opt
Expand All @@ -34,6 +35,11 @@ ENV VARIABLE_NAME=app
ENV PORT=8808
ENV GUNICORN_CMD_ARGS="--preload"

# TODO: use piptools to install dependencies only when needed?
# COPY pyproject.toml .
# RUN python -m piptools compile --extra dev --extra train --extra test -o requirements.txt pyproject.toml
# RUN pip install -r requirements.txt

## Copy the source code (in the same folder as the Dockerfile)
COPY . .

Expand Down
3 changes: 2 additions & 1 deletion docker-compose.prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ services:
build: .
restart: unless-stopped
volumes:
- ./data:/app/data
- ./:/app
# - ./data:/app/data
# - /data/openpredict:/app/data
# entrypoint: gunicorn -w 8 -k uvicorn.workers.UvicornWorker --bind 0.0.0.0:8808 --timeout 600 trapi.main:app

Expand Down

0 comments on commit 362ac50

Please sign in to comment.