KoonJamesZ commited on
Commit
d9f7c12
1 Parent(s): f40cf42

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +29 -7
Dockerfile CHANGED
@@ -1,15 +1,37 @@
1
- FROM python:3.11.2
 
2
 
3
- WORKDIR /workspace
 
4
 
5
- COPY requirements.txt .
 
 
 
 
 
 
 
 
 
 
 
 
6
 
 
 
 
 
7
  RUN pip install --no-cache-dir torch==2.4.1
8
 
9
- RUN pip3 install -r requirements.txt
 
10
 
11
- COPY . .
 
12
 
13
- EXPOSE 7860
 
14
 
15
- ENTRYPOINT [ "python3", "app.py" ]
 
 
1
+ # Use an official Python base image
2
+ FROM python:3.10-slim
3
 
4
+ # Set the working directory
5
+ WORKDIR /app
6
 
7
+ # Install 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
+ curl && \
18
+ rm -rf /var/lib/apt/lists/* && \
19
+ git lfs install
20
 
21
+ # Install Node.js (if needed)
22
+ RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && apt-get install -y nodejs
23
+
24
+ # Install torch separately before other dependencies to avoid issues
25
  RUN pip install --no-cache-dir torch==2.4.1
26
 
27
+ # Copy requirements.txt file
28
+ COPY requirements.txt /app/requirements.txt
29
 
30
+ # Install the remaining Python dependencies
31
+ RUN pip install --no-cache-dir -r /app/requirements.txt
32
 
33
+ # Copy the rest of your app's code to the container
34
+ COPY . /app
35
 
36
+ # Set the entry point for your app (optional, customize as needed)
37
+ CMD ["python", "app.py"]