jeanbaptdzd commited on
Commit
efa48fc
·
1 Parent(s): a4e7832

Update to CUDA 12.4.1 to remove deprecation warning

Browse files
Files changed (1) hide show
  1. Dockerfile +19 -5
Dockerfile CHANGED
@@ -1,10 +1,21 @@
1
- FROM python:3.11-slim
2
 
3
- # Install system dependencies
 
 
 
 
4
  RUN apt-get update && apt-get install -y \
5
- gcc \
6
- g++ \
7
- && rm -rf /var/lib/apt/lists/*
 
 
 
 
 
 
 
8
 
9
  # Set working directory
10
  WORKDIR /app
@@ -22,6 +33,9 @@ COPY app/ ./app/
22
  RUN useradd -m -u 1000 user && chown -R user:user /app
23
  USER user
24
 
 
 
 
25
  # Expose port
26
  EXPOSE 7860
27
 
 
1
+ FROM nvidia/cuda:12.4.1-runtime-ubuntu22.04
2
 
3
+ # Set environment variables
4
+ ENV DEBIAN_FRONTEND=noninteractive
5
+ ENV PYTHONUNBUFFERED=1
6
+
7
+ # Install Python and system dependencies
8
  RUN apt-get update && apt-get install -y \
9
+ python3.11 \
10
+ python3.11-dev \
11
+ python3-pip \
12
+ git \
13
+ curl \
14
+ && rm -rf /var/lib/apt/lists/* \
15
+ && ln -s /usr/bin/python3.11 /usr/bin/python
16
+
17
+ # Upgrade pip
18
+ RUN python -m pip install --upgrade pip
19
 
20
  # Set working directory
21
  WORKDIR /app
 
33
  RUN useradd -m -u 1000 user && chown -R user:user /app
34
  USER user
35
 
36
+ # Set HuggingFace cache directory
37
+ ENV HF_HOME=/tmp/huggingface
38
+
39
  # Expose port
40
  EXPOSE 7860
41