fffiloni commited on
Commit
bda7b65
·
1 Parent(s): 40b1bcb

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +16 -0
Dockerfile CHANGED
@@ -23,5 +23,21 @@ 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
  # Run the Python script inside the Docker container
27
  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"]
 
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
+
29
+ # Switch to the "user" user
30
+ USER user
31
+
32
+ # Set home to the user's home directory
33
+ ENV HOME=/home/user \
34
+ PATH=/home/user/.local/bin:$PATH
35
+
36
+ # Set the working directory to the user's home directory
37
+ WORKDIR $HOME/app
38
+
39
+ # Copy the current directory contents into the container at $HOME/app setting the owner to the user
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"]