Leon4gr45 commited on
Commit
cdc816f
·
verified ·
1 Parent(s): 12530ec

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -3
Dockerfile CHANGED
@@ -1,18 +1,22 @@
1
  # Use a standard base image with CUDA support
2
  FROM pytorch/pytorch:2.3.0-cuda12.1-cudnn8-runtime
3
 
4
- # Set environment variables for caching
5
  ENV DEBIAN_FRONTEND=noninteractive
6
  ENV HF_HOME="/data/huggingface"
7
  ENV UV_CACHE_DIR="/data/uv_cache"
8
 
 
 
 
 
 
9
  # Install git and uv (for faster package installation)
10
  RUN apt-get update && apt-get install -y --no-install-recommends git && rm -rf /var/lib/apt/lists/*
11
  RUN pip install uv
12
 
13
- # Copy requirements and install them efficiently
14
  COPY requirements.txt .
15
- # THE FIX IS HERE: Add the --system flag to the uv command
16
  RUN uv pip install --no-cache --system -r requirements.txt
17
 
18
  # Copy the application code into the container
 
1
  # Use a standard base image with CUDA support
2
  FROM pytorch/pytorch:2.3.0-cuda12.1-cudnn8-runtime
3
 
4
+ # Set environment variables for caching AND for CUDA libraries
5
  ENV DEBIAN_FRONTEND=noninteractive
6
  ENV HF_HOME="/data/huggingface"
7
  ENV UV_CACHE_DIR="/data/uv_cache"
8
 
9
+ # --- THE CRITICAL FIX ---
10
+ # Tell the dynamic linker where to find the NVIDIA CUDA libraries.
11
+ # This makes `libcuda.so.1` visible to vLLM.
12
+ ENV LD_LIBRARY_PATH=/usr/local/nvidia/lib64:$LD_LIBRARY_PATH
13
+
14
  # Install git and uv (for faster package installation)
15
  RUN apt-get update && apt-get install -y --no-install-recommends git && rm -rf /var/lib/apt/lists/*
16
  RUN pip install uv
17
 
18
+ # Copy requirements and install them efficiently into the system environment
19
  COPY requirements.txt .
 
20
  RUN uv pip install --no-cache --system -r requirements.txt
21
 
22
  # Copy the application code into the container