diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..647d3b4 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,46 @@ +# โœ… Base image with CUDA 12.4 +FROM nvidia/cuda:12.4.0-runtime-ubuntu22.04 + +# Set environment vars +ENV DEBIAN_FRONTEND=noninteractive \ + LANG=C.UTF-8 \ + LC_ALL=C.UTF-8 \ + PATH="/opt/conda/bin:$PATH" \ + PYTHONUNBUFFERED=1 + +# ๐Ÿ”ง Install system dependencies +RUN apt-get update && apt-get install -y --no-install-recommends \ + git wget curl build-essential ca-certificates \ + libglib2.0-0 libsm6 libxext6 libxrender-dev ffmpeg \ + && rm -rf /var/lib/apt/lists/* + +# ๐Ÿ Install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh && \ + bash miniconda.sh -b -p /opt/conda && rm miniconda.sh + +# ๐Ÿงช Create Conda env and install CUDA toolkit & sparsehash +RUN conda create -n spatiallm python=3.11 -y && \ + conda run -n spatiallm conda install -c nvidia/label/cuda-12.4.0 cuda-toolkit -y && \ + conda run -n spatiallm conda install -c conda-forge sparsehash -y && \ + conda clean -afy + +# ๐Ÿ“ฆ Install Poetry +RUN conda run -n spatiallm pip install poetry && \ + conda run -n spatiallm poetry config virtualenvs.create false --local + +# ๐Ÿ“ Clone SpatialLM +WORKDIR /workspace +RUN git clone https://github.com/manycore-research/SpatialLM.git +WORKDIR /workspace/SpatialLM + +# ๐Ÿ“œ Install dependencies via Poetry +RUN conda run -n spatiallm poetry install + +# ๐Ÿ› ๏ธ Build torchsparse (slow, but necessary) +RUN conda run -n spatiallm poetry run poe install-torchsparse + +# ๐Ÿ“‚ Create folders for model/testset/output if needed +RUN mkdir -p /workspace/models /workspace/output /workspace/data + +# ๐Ÿงผ Set entrypoint +CMD ["/bin/bash"]