Skip to content

Commit

Permalink
Move Dockerfile to project root to avoid permissions issues. Allocate…
Browse files Browse the repository at this point in the history
… more memory to docker-compose to avoid OOM
  • Loading branch information
sabaimran committed Jul 4, 2022
1 parent 7677465 commit 092d0f2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion config/Dockerfile → Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ RUN apt-get update -y && \
# Add the local code to the /app directory and set it to be the working directory.
# Since we mount the /app directory as a volume in docker-compose.yml, this
# allows us to automatically update the code in the Docker image when it's changed.
ADD .. /app
ADD . /app
WORKDIR /app

# Get the arguments from the docker-compose environment.
Expand Down
2 changes: 1 addition & 1 deletion README.org
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

** Upgrade
#+begin_src shell
docker-compose build
docker-compose build --pull
#+end_src

** Troubleshooting
Expand Down
7 changes: 5 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ services:
server:
build:
context: .
dockerfile: config/Dockerfile
dockerfile: Dockerfile
args:
- PORT=8000
ports:
Expand All @@ -28,6 +28,9 @@ services:
# You can set these volumes to point to empty directories on host
- ./tests/data/embeddings/:/data/embeddings/
- ./tests/data/models/:/data/models/

deploy:
resources:
limits:
memory: 2GB
# Use 0.0.0.0 to explicitly set the host ip for the service on the container. https://pythonspeed.com/articles/docker-connection-refused/
command: --host="0.0.0.0" --port=8000 -c=config/sample_config.yml -vv

0 comments on commit 092d0f2

Please sign in to comment.