Skip to content

Commit

Permalink
Merge pull request #4 from swiss-ai-center/3-improve-the-local-develo…
Browse files Browse the repository at this point in the history
…pment-experience

Improve the local development experience
  • Loading branch information
andrptrc authored Jan 31, 2024
2 parents f3ba310 + e288183 commit 3683e36
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
2 changes: 2 additions & 0 deletions development.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Base image
FROM python:3.10
26 changes: 26 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
services:
service:
container_name: service
build:
context: .
dockerfile: development.Dockerfile
command: |
bash -c "
# Create the virtual environment
python3.10 -m venv .venv &&
# Activate the virtual environment
source .venv/bin/activate &&
# Install the dependencies
pip install -r requirements.txt -r requirements-all.txt &&
# Run the service
cd src &&
uvicorn --reload --host 0.0.0.0 --port 9090 main:app
"
environment:
- ENGINE_URLS=["http://host.docker.internal:8080"]
- SERVICE_URL=http://host.docker.internal:9090
ports:
- 9090:9090
working_dir: /workspaces/service
volumes:
- .:/workspaces/service

0 comments on commit 3683e36

Please sign in to comment.