Skip to content

Commit

Permalink
Docker: Switch image and copy config
Browse files Browse the repository at this point in the history
Automatically create a config.yml on build. Also use the cuda runtime
image which is much lighter than the previous cuda devel image.

Signed-off-by: kingbri <[email protected]>
  • Loading branch information
bdashore3 committed Apr 15, 2024
1 parent a2a2e4b commit 209f037
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions docker/.dockerignore
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
models/
loras/
.ruff_cache/
**/__pycache__/
6 changes: 5 additions & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Use an official CUDA runtime with Ubuntu as a parent image
FROM nvidia/cuda:12.2.0-devel-ubuntu22.04
FROM nvidia/cuda:12.4.1-runtime-ubuntu22.04

# Set the working directory in the container
WORKDIR /app
Expand All @@ -11,6 +11,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
python3.11 \
python3-pip \
git \
&& rm -rf /var/lib/apt/lists/*

# Upgrade pip
Expand All @@ -25,6 +26,9 @@ RUN pip3 install --no-cache-dir .[cu121]
# Copy the current directory contents into the container
COPY . .

# Create a config.yml
COPY config_sample.yml config.yml

# Make port 5000 available to the world outside this container
EXPOSE 5000

Expand Down

0 comments on commit 209f037

Please sign in to comment.