Spaces:
Paused
Paused
Update Dockerfile
Browse files- Dockerfile +21 -6
Dockerfile
CHANGED
@@ -1,5 +1,20 @@
|
|
1 |
-
|
2 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
|
4 |
# Set up a new user named "user" with user ID 1000
|
5 |
RUN useradd -m -u 1000 user
|
@@ -18,13 +33,13 @@ WORKDIR $HOME/app
|
|
18 |
RUN git clone -b dev https://github.com/camenduru/DiffBIR $HOME/app
|
19 |
|
20 |
# Install PyTorch and torchvision with a specific CUDA toolkit version
|
21 |
-
RUN
|
22 |
|
23 |
# Install Python dependencies
|
24 |
-
RUN
|
25 |
|
26 |
# Install open_clip from GitHub
|
27 |
-
RUN
|
28 |
|
29 |
# Use sudo to install aria2 with elevated privileges
|
30 |
USER root
|
@@ -52,4 +67,4 @@ RUN aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co
|
|
52 |
RUN find $HOME/app
|
53 |
|
54 |
# Define the command to run your application
|
55 |
-
CMD ["python", "gradio_diffbir.py", "--ckpt", "/home/user/app/models/general_full_v1.ckpt", "--config", "/home/user/app/configs/model/cldm.yaml", "--reload_swinir", "--swinir_ckpt", "/home/user/app/models/general_swinir_v1.ckpt"
|
|
|
1 |
+
FROM nvidia/cuda:11.7.1-cudnn8-devel-ubuntu22.04
|
2 |
+
|
3 |
+
ENV DEBIAN_FRONTEND noninteractive
|
4 |
+
|
5 |
+
# Install Python 3.9 and required packages
|
6 |
+
RUN apt-get update && \
|
7 |
+
apt-get install -y python3.9 python3.9-dev python3-pip && \
|
8 |
+
apt-get clean && \
|
9 |
+
rm -rf /var/lib/apt/lists/*
|
10 |
+
|
11 |
+
# Set Python 3.9 as the default
|
12 |
+
RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.9 1
|
13 |
+
|
14 |
+
# Install pip for Python 3.9
|
15 |
+
RUN wget https://bootstrap.pypa.io/get-pip.py && \
|
16 |
+
python3.9 get-pip.py && \
|
17 |
+
rm get-pip.py
|
18 |
|
19 |
# Set up a new user named "user" with user ID 1000
|
20 |
RUN useradd -m -u 1000 user
|
|
|
33 |
RUN git clone -b dev https://github.com/camenduru/DiffBIR $HOME/app
|
34 |
|
35 |
# Install PyTorch and torchvision with a specific CUDA toolkit version
|
36 |
+
RUN pip3 install torch==1.12.1+cu113 torchvision==0.13.1+cu113 -f https://download.pytorch.org/whl/torch_stable.html
|
37 |
|
38 |
# Install Python dependencies
|
39 |
+
RUN pip3 install -q einops pytorch_lightning gradio omegaconf xformers==0.0.20 transformers lpips opencv-python
|
40 |
|
41 |
# Install open_clip from GitHub
|
42 |
+
RUN pip3 install -q git+https://github.com/mlfoundations/open_clip@v2.20.0
|
43 |
|
44 |
# Use sudo to install aria2 with elevated privileges
|
45 |
USER root
|
|
|
67 |
RUN find $HOME/app
|
68 |
|
69 |
# Define the command to run your application
|
70 |
+
CMD ["python", "gradio_diffbir.py", "--ckpt", "/home/user/app/models/general_full_v1.ckpt", "--config", "/home/user/app/configs/model/cldm.yaml", "--reload_swinir", "--swinir_ckpt", "/home/user/app/models/general_swinir_v1.ckpt"]
|