update dockerfile (#47)

This commit is contained in:
Susan Shen
2024-09-06 14:44:58 +02:00
committed by GitHub
parent 379e35cb40
commit 81ac531aa9

View File

@@ -4,13 +4,13 @@ FROM pytorch/pytorch:2.3.1-cuda12.1-cudnn8-devel
ARG USE_CUDA=0 ARG USE_CUDA=0
ARG TORCH_ARCH="7.0;7.5;8.0;8.6" ARG TORCH_ARCH="7.0;7.5;8.0;8.6"
ENV AM_I_DOCKER True ENV AM_I_DOCKER=True
ENV BUILD_WITH_CUDA "${USE_CUDA}" ENV BUILD_WITH_CUDA="${USE_CUDA}"
ENV TORCH_CUDA_ARCH_LIST="${TORCH_ARCH}" ENV TORCH_CUDA_ARCH_LIST="${TORCH_ARCH}"
ENV CUDA_HOME /usr/local/cuda-12.1/ ENV CUDA_HOME=/usr/local/cuda-12.1/
# Ensure CUDA is correctly set up # Ensure CUDA is correctly set up
ENV PATH /usr/local/cuda-12.1/bin:${PATH} ENV PATH=/usr/local/cuda-12.1/bin:${PATH}
ENV LD_LIBRARY_PATH /usr/local/cuda-12.1/lib64:${LD_LIBRARY_PATH} ENV LD_LIBRARY_PATH=/usr/local/cuda-12.1/lib64:${LD_LIBRARY_PATH}
# Install required packages and specific gcc/g++ # Install required packages and specific gcc/g++
RUN apt-get update && apt-get install --no-install-recommends wget ffmpeg=7:* \ RUN apt-get update && apt-get install --no-install-recommends wget ffmpeg=7:* \
@@ -27,7 +27,8 @@ WORKDIR /home/appuser/Grounded-SAM-2
# Install essential Python packages # Install essential Python packages
RUN python -m pip install --upgrade pip setuptools wheel numpy RUN python -m pip install --upgrade pip setuptools wheel numpy \
opencv-python transformers supervision pycocotools addict yapf timm
# Install segment_anything package in editable mode # Install segment_anything package in editable mode
RUN python -m pip install -e . RUN python -m pip install -e .