From 209f0370b47700ced14b0bd5b5902d775b5e706d Mon Sep 17 00:00:00 2001 From: kingbri Date: Mon, 15 Apr 2024 18:01:56 -0400 Subject: [PATCH] Docker: Switch image and copy config 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 --- docker/.dockerignore | 3 +++ docker/Dockerfile | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/docker/.dockerignore b/docker/.dockerignore index 2bcdfd9..f223bdc 100644 --- a/docker/.dockerignore +++ b/docker/.dockerignore @@ -1 +1,4 @@ models/ +loras/ +.ruff_cache/ +**/__pycache__/ \ No newline at end of file diff --git a/docker/Dockerfile b/docker/Dockerfile index d002553..5089ea7 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -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 @@ -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 @@ -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