Spaces:
Paused
Paused
Update Dockerfile
Browse files- Dockerfile +8 -6
Dockerfile
CHANGED
@@ -1,14 +1,15 @@
|
|
1 |
-
#
|
2 |
-
|
3 |
|
4 |
-
|
5 |
-
|
|
|
6 |
|
7 |
# Clone the repository
|
8 |
RUN git clone -b dev https://github.com/camenduru/DiffBIR
|
9 |
|
10 |
# Change the working directory to /content/DiffBIR
|
11 |
-
WORKDIR /
|
12 |
|
13 |
# Install Python dependencies
|
14 |
RUN pip install -q einops pytorch_lightning gradio omegaconf xformers==0.0.20 transformers lpips
|
@@ -23,6 +24,7 @@ RUN apt-get update && apt-get install -y aria2
|
|
23 |
RUN aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lxq007/DiffBIR/resolve/main/general_full_v1.ckpt -d /content/models -o general_full_v1.ckpt
|
24 |
RUN aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lxq007/DiffBIR/resolve/main/general_swinir_v1.ckpt -d /content/models -o general_swinir_v1.ckpt
|
25 |
|
|
|
26 |
# Set up a new user named "user" with user ID 1000
|
27 |
RUN useradd -m -u 1000 user
|
28 |
|
@@ -40,4 +42,4 @@ WORKDIR $HOME/app
|
|
40 |
COPY --chown=user . $HOME/app
|
41 |
|
42 |
# Run the Python script inside the Docker container
|
43 |
-
CMD ["python", "gradio_diffbir.py", "--ckpt", "
|
|
|
1 |
+
# read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker
|
2 |
+
# you will also find guides on how best to write your Dockerfile
|
3 |
|
4 |
+
FROM python:3.9
|
5 |
+
|
6 |
+
WORKDIR /code
|
7 |
|
8 |
# Clone the repository
|
9 |
RUN git clone -b dev https://github.com/camenduru/DiffBIR
|
10 |
|
11 |
# Change the working directory to /content/DiffBIR
|
12 |
+
WORKDIR /code/DiffBIR
|
13 |
|
14 |
# Install Python dependencies
|
15 |
RUN pip install -q einops pytorch_lightning gradio omegaconf xformers==0.0.20 transformers lpips
|
|
|
24 |
RUN aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lxq007/DiffBIR/resolve/main/general_full_v1.ckpt -d /content/models -o general_full_v1.ckpt
|
25 |
RUN aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lxq007/DiffBIR/resolve/main/general_swinir_v1.ckpt -d /content/models -o general_swinir_v1.ckpt
|
26 |
|
27 |
+
|
28 |
# Set up a new user named "user" with user ID 1000
|
29 |
RUN useradd -m -u 1000 user
|
30 |
|
|
|
42 |
COPY --chown=user . $HOME/app
|
43 |
|
44 |
# Run the Python script inside the Docker container
|
45 |
+
CMD ["python", "gradio_diffbir.py", "--ckpt", "models/general_full_v1.ckpt", "--config", "configs/model/cldm.yaml", "--reload_swinir", "--swinir_ckpt", "models/general_swinir_v1.ckpt"]
|