Leri777 commited on
Commit
05ac89e
·
verified ·
1 Parent(s): c16db91

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +23 -8
Dockerfile CHANGED
@@ -1,18 +1,33 @@
1
- FROM python:3.10-slim
 
2
 
3
- WORKDIR /app
 
4
 
 
5
  RUN apt-get update && apt-get install -y \
6
  git \
7
- && rm -rf /var/lib/apt/lists/*
 
 
 
 
 
 
 
 
8
 
9
- COPY requirements.txt .
10
- RUN pip install --no-cache-dir -r requirements.txt
11
 
12
- COPY . .
 
13
 
14
- ENV HF_TOKEN=${HF_TOKEN}
 
15
 
 
16
  EXPOSE 7860
17
 
18
- CMD ["python", "app.py"]
 
 
1
+ # Base image
2
+ FROM python:3.10.13-slim
3
 
4
+ # Set the working directory
5
+ WORKDIR /home/user/app
6
 
7
+ # Install necessary system dependencies
8
  RUN apt-get update && apt-get install -y \
9
  git \
10
+ git-lfs \
11
+ ffmpeg \
12
+ libsm6 \
13
+ libxext6 \
14
+ cmake \
15
+ rsync \
16
+ libgl1-mesa-glx && \
17
+ rm -rf /var/lib/apt/lists/* && \
18
+ git lfs install
19
 
20
+ # Copy the requirements file
21
+ COPY requirements.txt /tmp/requirements.txt
22
 
23
+ # Install Python dependencies
24
+ RUN pip install --no-cache-dir -r /tmp/requirements.txt
25
 
26
+ # Copy the rest of the application
27
+ COPY . /home/user/app
28
 
29
+ # Expose the default port for Gradio
30
  EXPOSE 7860
31
 
32
+ # Start the app
33
+ CMD ["python", "app.py"]