fffiloni commited on
Commit
b1f8888
·
verified ·
1 Parent(s): 0faf301

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +21 -3
Dockerfile CHANGED
@@ -26,7 +26,7 @@ USER user
26
 
27
  ENV HOME=/home/user \
28
  PATH=/home/user/.local/bin:$PATH \
29
- PYTHONPATH=$HOME/app \
30
  PYTHONUNBUFFERED=1 \
31
  GRADIO_ALLOW_FLAGGING=never \
32
  GRADIO_NUM_PORTS=1 \
@@ -45,9 +45,27 @@ RUN git clone https://github.com/google/RB-Modulation.git $HOME/app
45
  # Set the working directory
46
  WORKDIR $HOME/app
47
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
48
  # Upgrade pip and install Gradio
49
- RUN python3 -m pip install --upgrade pip && \
50
- python3 -m pip install --no-cache-dir gradio
51
 
52
  # Copy the app.py file from the host to the container
53
  COPY --chown=user:user app.py .
 
26
 
27
  ENV HOME=/home/user \
28
  PATH=/home/user/.local/bin:$PATH \
29
+ PYTHONPATH=$HOME/app:$HOME/app/third_party/StableCascade:$PYTHONPATH \
30
  PYTHONUNBUFFERED=1 \
31
  GRADIO_ALLOW_FLAGGING=never \
32
  GRADIO_NUM_PORTS=1 \
 
45
  # Set the working directory
46
  WORKDIR $HOME/app
47
 
48
+ RUN python3 -m pip install --upgrade pip
49
+
50
+ # Download pretrained models
51
+ RUN cd third_party/StableCascade/models && \
52
+ bash download_models.sh essential big-big bfloat16 && \
53
+ cd ../../..
54
+
55
+ # Install StableCascade requirements
56
+ RUN cd third_party/StableCascade && \
57
+ pip install --no-cache-dir -r requirements.txt && \
58
+ pip install --no-cache-dir jupyter notebook opencv-python matplotlib ftfy && \
59
+ cd ../..
60
+
61
+ # Install gdown for Google Drive downloads
62
+ RUN pip install --no-cache-dir gdown
63
+
64
+ # Download pre-trained CSD weights
65
+ RUN gdown https://drive.google.com/uc?id=1FX0xs8p-C7Ob-h5Y4cUhTeOepHzXv_46 -O third_party/CSD/checkpoint.pth
66
+
67
  # Upgrade pip and install Gradio
68
+ RUN python3 -m pip install --no-cache-dir gradio
 
69
 
70
  # Copy the app.py file from the host to the container
71
  COPY --chown=user:user app.py .