fffiloni commited on
Commit
4ac02e3
·
1 Parent(s): bda7b65

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -6
Dockerfile CHANGED
@@ -1,14 +1,15 @@
1
- # Use an official Python runtime as a parent image
2
- FROM python:3.8
3
 
4
- # Set the working directory to /content
5
- WORKDIR /content
 
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 /content/DiffBIR
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", "/content/models/general_full_v1.ckpt", "--config", "/content/DiffBIR/configs/model/cldm.yaml", "--reload_swinir", "--swinir_ckpt", "/content/models/general_swinir_v1.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"]