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

Improve the local development experience #4

Merged
merged 1 commit into from
Jan 31, 2024
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
5 changes: 5 additions & 0 deletions development.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Base image
FROM python:3.10

# Install all required packages to run the model
RUN apt update && apt install --yes ffmpeg libsm6 libxext6
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
Loading