feylur commited on
Commit
10c5c90
·
verified ·
1 Parent(s): f3cd269

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -8
Dockerfile CHANGED
@@ -4,19 +4,20 @@ FROM python:3.10-slim
4
  # Set working directory
5
  WORKDIR /app
6
 
7
- # Install system dependencies
8
  RUN apt-get update && apt-get install -y \
9
  git \
10
  wget \
11
- libgl1-mesa-glx \
12
  libglib2.0-0 \
13
  libsm6 \
14
  libxext6 \
15
- libxrender-dev \
16
  libgomp1 \
 
17
  && rm -rf /var/lib/apt/lists/*
18
 
19
- # Copy requirements first (for better Docker caching)
20
  COPY requirements.txt .
21
 
22
  # Install Python dependencies in order (CPU versions)
@@ -27,15 +28,15 @@ RUN pip install --no-cache-dir numpy==1.26.4 && \
27
  pip install --no-cache-dir torch==2.1.0 torchvision==0.16.0 torchaudio==2.1.0 --index-url https://download.pytorch.org/whl/cpu && \
28
  pip install --no-cache-dir -r requirements.txt
29
 
30
- # Copy entire application
31
  COPY . .
32
 
33
- # Expose Gradio port
34
  EXPOSE 7860
35
 
36
- # Set environment variables
37
  ENV GRADIO_SERVER_NAME=0.0.0.0
38
  ENV GRADIO_SERVER_PORT=7860
39
 
40
- # Run the app
41
  CMD ["python", "app.py"]
 
4
  # Set working directory
5
  WORKDIR /app
6
 
7
+ # Install system dependencies (FIXED package names for newer Debian)
8
  RUN apt-get update && apt-get install -y \
9
  git \
10
  wget \
11
+ libgl1 \
12
  libglib2.0-0 \
13
  libsm6 \
14
  libxext6 \
15
+ libxrender1 \
16
  libgomp1 \
17
+ libgthread-2.0-0 \
18
  && rm -rf /var/lib/apt/lists/*
19
 
20
+ # Copy requirements first
21
  COPY requirements.txt .
22
 
23
  # Install Python dependencies in order (CPU versions)
 
28
  pip install --no-cache-dir torch==2.1.0 torchvision==0.16.0 torchaudio==2.1.0 --index-url https://download.pytorch.org/whl/cpu && \
29
  pip install --no-cache-dir -r requirements.txt
30
 
31
+ # Copy application
32
  COPY . .
33
 
34
+ # Expose port
35
  EXPOSE 7860
36
 
37
+ # Environment variables
38
  ENV GRADIO_SERVER_NAME=0.0.0.0
39
  ENV GRADIO_SERVER_PORT=7860
40
 
41
+ # Run app
42
  CMD ["python", "app.py"]