@@ -27,39 +27,26 @@ RUN apt-get update && apt-get install -y -q --no-install-recommends \
2727 && apt-get clean \
2828 && rm -rf /var/lib/apt/lists/*
2929
30- # Install Python 3.11
31- RUN apt-add-repository -y ppa:deadsnakes/ppa \
32- && apt-get install -y -q --no-install-recommends python3.11 python3.11-dev python3.11-distutils \
33- && apt-get clean \
34- && rm -rf /var/lib/apt/lists/*
35-
36- RUN curl -sS https://bootstrap.pypa.io/get-pip.py | python3.11
37-
38- # Set Python 3.11 as default
39- RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.11 11 && \
40- update-alternatives --install /usr/bin/python python /usr/bin/python3.11 11
41-
42- RUN apt-get remove -y cmake && pip3 install --no-cache-dir --upgrade cmake
30+ # Install uv
31+ RUN curl -LsSf https://astral.sh/uv/install.sh | env UV_INSTALL_DIR="/usr/bin" sh
4332
4433# Copy the gpudrive repository
4534COPY . /gpudrive
4635WORKDIR /gpudrive
47- RUN git submodule update --init --recursive --depth 1
36+ RUN git submodule update --init --recursive
37+
38+ # Install python part using uv
39+ RUN uv sync --frozen
4840
4941ENV MADRONA_MWGPU_KERNEL_CACHE=./gpudrive_cache
5042
5143RUN mkdir build
5244WORKDIR /gpudrive/build
53- RUN cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_POLICY_VERSION_MINIMUM=3.5 && find external -type f -name "*.tar" -delete
45+ RUN uv run cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_POLICY_VERSION_MINIMUM=3.5 && find external -type f -name "*.tar" -delete
5446RUN ln -s /usr/local/cuda/lib64/stubs/libcuda.so /usr/local/cuda/lib64/stubs/libcuda.so.1
55- RUN LD_LIBRARY_PATH=/usr/local/cuda/lib64/stubs/:$LD_LIBRARY_PATH make -j
47+ RUN LD_LIBRARY_PATH=/usr/local/cuda/lib64/stubs/:$LD_LIBRARY_PATH uv run make -j
5648RUN rm /usr/local/cuda/lib64/stubs/libcuda.so.1
5749WORKDIR /gpudrive
5850
59- RUN pip3 install --no-cache-dir torch==2.6.0 && rm -rf ~/.cache/pip/*
60- RUN pip3 install --no-cache-dir tensorflow==2.19.0 && rm -rf ~/.cache/pip/*
61- RUN pip3 install --no-cache-dir nvidia-cuda-runtime-cu12==12.4.127 && rm -rf ~/.cache/pip/*
62- RUN pip3 install --no-cache-dir -e .[vbd,pufferlib]
63-
6451CMD ["/bin/bash" ]
6552LABEL org.opencontainers.image.source=https://github.com/Emerge-Lab/gpudrive
0 commit comments