Merge pull request #72 from marclp-es/docker_improvements

Docker improvements
This commit is contained in:
Timothy Jaeryang Baek 2024-06-06 20:50:54 -07:00 committed by GitHub
commit 93cb893666
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 8 additions and 3 deletions

1
.dockerignore Normal file
View File

@ -0,0 +1 @@
.venv

4
.gitignore vendored
View File

@ -6,4 +6,6 @@ __pycache__
pipelines/*
!pipelines/.gitignore
.DS_Store
.DS_Store
.venv

View File

@ -18,11 +18,11 @@ RUN apt-get update && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Copy the application code
COPY . /app
WORKDIR /app
# Install Python dependencies
COPY ./requirements.txt .
RUN pip3 install uv && \
if [ "$USE_CUDA" = "true" ]; then \
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/$USE_CUDA_DOCKER_VER --no-cache-dir && \
@ -32,6 +32,8 @@ RUN pip3 install uv && \
uv pip install --system -r requirements.txt --no-cache-dir; \
fi
# Copy the application code
COPY . .
# Expose the port
ENV HOST="0.0.0.0"