edemana commited on
Commit
5f95911
·
verified ·
1 Parent(s): dc4ac4a

Update Dockerfile

Browse files
Files changed (1) hide show
  1. 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
- # Set the working directory in the container
5
- WORKDIR /app
 
 
 
 
6
 
7
- # Copy the requirements file into the container
8
- COPY requirements.txt .
 
 
 
 
 
 
 
9
 
10
- # Install the Python dependencies
11
- RUN pip install --no-cache-dir -r requirements.txt
12
 
13
- # Copy the rest of the application code into the container
14
- COPY . .
 
 
15
 
16
- # Expose the port that Gradio uses
17
- EXPOSE 7860
18
 
19
- # Command to run the Gradio app
20
- CMD ["python", "model.py"]
 
 
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"]