Skip to content

Commit

Permalink
Improve Dockerfile
Browse files Browse the repository at this point in the history
Add .venv to gitignore & dockerignore
  • Loading branch information
Marc Lopez committed Jun 7, 2024
1 parent ac037b9 commit 02e048c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.venv
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ __pycache__

pipelines/*
!pipelines/.gitignore
.DS_Store
.DS_Store

.venv
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 && \
Expand All @@ -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"
Expand Down

0 comments on commit 02e048c

Please sign in to comment.