Spaces:
Build error
Build error
Update Dockerfile
Browse files- Dockerfile +12 -1
Dockerfile
CHANGED
|
@@ -72,10 +72,18 @@ RUN cd third_party/StableCascade && \
|
|
| 72 |
RUN pip install --no-cache-dir gdown
|
| 73 |
|
| 74 |
# Download pre-trained CSD weights
|
| 75 |
-
RUN gdown https://drive.google.com/uc?id=1FX0xs8p-C7Ob-h5Y4cUhTeOepHzXv_46 -O third_party/CSD/checkpoint.pth
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 76 |
|
| 77 |
RUN ls -R $HOME/app/third_party/CSD
|
| 78 |
|
|
|
|
|
|
|
|
|
|
| 79 |
# Install LangSAM and its dependencies
|
| 80 |
RUN pip install --no-cache-dir git+https://github.com/IDEA-Research/GroundingDINO.git && \
|
| 81 |
pip install --no-cache-dir segment-anything==1.0 && \
|
|
@@ -87,6 +95,9 @@ RUN pip install --no-cache-dir git+https://github.com/IDEA-Research/GroundingDIN
|
|
| 87 |
# Upgrade pip and install Gradio
|
| 88 |
RUN python3 -m pip install --no-cache-dir gradio
|
| 89 |
|
|
|
|
|
|
|
|
|
|
| 90 |
# Copy the app.py file from the host to the container
|
| 91 |
COPY --chown=user:user app.py .
|
| 92 |
|
|
|
|
| 72 |
RUN pip install --no-cache-dir gdown
|
| 73 |
|
| 74 |
# Download pre-trained CSD weights
|
| 75 |
+
RUN gdown https://drive.google.com/uc?id=1FX0xs8p-C7Ob-h5Y4cUhTeOepHzXv_46 -O $HOME/app/third_party/CSD/checkpoint.pth
|
| 76 |
+
|
| 77 |
+
# Verify the download
|
| 78 |
+
RUN if [ ! -f "$HOME/app/third_party/CSD/checkpoint.pth" ]; then \
|
| 79 |
+
echo "CSD checkpoint file not found" && exit 1; \
|
| 80 |
+
fi
|
| 81 |
|
| 82 |
RUN ls -R $HOME/app/third_party/CSD
|
| 83 |
|
| 84 |
+
# Ensure CSD is a proper Python package
|
| 85 |
+
RUN touch $HOME/app/third_party/CSD/__init__.py
|
| 86 |
+
|
| 87 |
# Install LangSAM and its dependencies
|
| 88 |
RUN pip install --no-cache-dir git+https://github.com/IDEA-Research/GroundingDINO.git && \
|
| 89 |
pip install --no-cache-dir segment-anything==1.0 && \
|
|
|
|
| 95 |
# Upgrade pip and install Gradio
|
| 96 |
RUN python3 -m pip install --no-cache-dir gradio
|
| 97 |
|
| 98 |
+
# Verify CSD module can be imported
|
| 99 |
+
RUN python -c "import CSD; print('CSD module successfully imported')"
|
| 100 |
+
|
| 101 |
# Copy the app.py file from the host to the container
|
| 102 |
COPY --chown=user:user app.py .
|
| 103 |
|