Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +24 -13
Dockerfile
CHANGED
@@ -1,20 +1,31 @@
|
|
1 |
-
# Use the official Python 3.10 base image
|
2 |
FROM python:3.11
|
3 |
|
4 |
-
#
|
5 |
-
|
|
|
|
|
|
|
|
|
6 |
|
7 |
-
#
|
8 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
|
10 |
-
#
|
11 |
-
RUN
|
12 |
|
13 |
-
# Copy
|
14 |
-
COPY . .
|
|
|
|
|
15 |
|
16 |
-
|
17 |
-
EXPOSE 7860
|
18 |
|
19 |
-
#
|
20 |
-
|
|
|
|
|
1 |
FROM python:3.11
|
2 |
|
3 |
+
# Install system dependencies
|
4 |
+
RUN apt-get update && apt-get install -y \
|
5 |
+
build-essential \
|
6 |
+
libgl1-mesa-glx \
|
7 |
+
git \
|
8 |
+
wget
|
9 |
|
10 |
+
# Install Python dependencies
|
11 |
+
RUN pip install --no-cache-dir \
|
12 |
+
torch==2.0.1+cu121 \
|
13 |
+
torchvision==0.15.1+cu121 \
|
14 |
+
torchaudio==2.1.1+cu121 \
|
15 |
+
gradio==3.7.1 \
|
16 |
+
tqdm \
|
17 |
+
pillow \
|
18 |
+
numpy
|
19 |
|
20 |
+
# Clone the repository and set up the model
|
21 |
+
RUN git clone https://github.com/NVlabs/stylegan2-ada-pytorch.git /stylegan2-ada-pytorch
|
22 |
|
23 |
+
# Copy application files
|
24 |
+
COPY app.py /app/app.py
|
25 |
+
COPY train.py /app/train.py
|
26 |
+
COPY ffhq.pkl /app/ffhq.pkl
|
27 |
|
28 |
+
WORKDIR /app
|
|
|
29 |
|
30 |
+
# Set the entrypoint
|
31 |
+
ENTRYPOINT ["python", "app.py"]
|