Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +1 -23
Dockerfile
CHANGED
|
@@ -42,6 +42,7 @@ ENV HOME=/home/user \
|
|
| 42 |
|
| 43 |
# Set CUDA_HOME environment variable
|
| 44 |
ENV CUDA_HOME=/usr/local/cuda-11.8
|
|
|
|
| 45 |
ENV LD_LIBRARY_PATH=${CUDA_HOME}/lib64:${LD_LIBRARY_PATH}
|
| 46 |
|
| 47 |
# Set the environment variable to specify the GPU device
|
|
@@ -108,29 +109,6 @@ RUN pip install --no-cache-dir git+https://github.com/IDEA-Research/GroundingDIN
|
|
| 108 |
pip install -e . && \
|
| 109 |
cd ..
|
| 110 |
|
| 111 |
-
# Create a custom setup.py for GroundingDINO extension
|
| 112 |
-
RUN echo "from setuptools import setup\n\
|
| 113 |
-
from torch.utils.cpp_extension import BuildExtension, CUDAExtension\n\
|
| 114 |
-
\n\
|
| 115 |
-
setup(\n\
|
| 116 |
-
name='groundingdino',\n\
|
| 117 |
-
ext_modules=[\n\
|
| 118 |
-
CUDAExtension(\n\
|
| 119 |
-
name='_C',\n\
|
| 120 |
-
sources=['/home/user/.local/lib/python3.10/site-packages/groundingdino/models/GroundingDINO/csrc/ms_deform_attn.cpp', '/home/user/.local/lib/python3.10/site-packages/groundingdino/models/GroundingDINO/csrc/ms_deform_attn_cuda.cu'],\n\
|
| 121 |
-
extra_compile_args={'cxx': ['-g'], 'nvcc': ['-O2', '-arch=sm_70']},\n\
|
| 122 |
-
),\n\
|
| 123 |
-
],\n\
|
| 124 |
-
cmdclass={\n\
|
| 125 |
-
'build_ext': BuildExtension\n\
|
| 126 |
-
}\n\
|
| 127 |
-
)" > /home/user/setup_groundingdino.py
|
| 128 |
-
|
| 129 |
-
# Compile the GroundingDINO custom C++ operations
|
| 130 |
-
RUN cd /home/user && \
|
| 131 |
-
python setup_groundingdino.py build_ext --inplace && \
|
| 132 |
-
rm setup_groundingdino.py
|
| 133 |
-
|
| 134 |
# Upgrade pip and install Gradio
|
| 135 |
RUN python3 -m pip install --no-cache-dir gradio
|
| 136 |
|
|
|
|
| 42 |
|
| 43 |
# Set CUDA_HOME environment variable
|
| 44 |
ENV CUDA_HOME=/usr/local/cuda-11.8
|
| 45 |
+
ENV TORCH_CUDA_ARCH_LIST="6.0;6.1;7.0;7.5;8.0;8.6+PTX;8.9;9.0"
|
| 46 |
ENV LD_LIBRARY_PATH=${CUDA_HOME}/lib64:${LD_LIBRARY_PATH}
|
| 47 |
|
| 48 |
# Set the environment variable to specify the GPU device
|
|
|
|
| 109 |
pip install -e . && \
|
| 110 |
cd ..
|
| 111 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 112 |
# Upgrade pip and install Gradio
|
| 113 |
RUN python3 -m pip install --no-cache-dir gradio
|
| 114 |
|