-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
107 additions
and
124 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
FROM nvidia/cuda:12.6.1-devel-ubuntu24.04 | ||
|
||
SHELL ["/bin/bash", "-c"] | ||
|
||
RUN apt-get update && apt-get upgrade -y && \ | ||
apt-get clean && rm -rf /var/lib/apt/lists/* | ||
|
||
RUN apt-get update && apt-get install -y sudo \ | ||
build-essential \ | ||
git \ | ||
libssl-dev \ | ||
zlib1g-dev \ | ||
libbz2-dev \ | ||
libreadline-dev \ | ||
libsqlite3-dev \ | ||
wget \ | ||
curl \ | ||
llvm \ | ||
libncurses5-dev \ | ||
libncursesw5-dev \ | ||
xz-utils \ | ||
tk-dev \ | ||
libffi-dev \ | ||
liblzma-dev \ | ||
python3-openssl \ | ||
libopencv-dev \ | ||
clang \ | ||
libclang-dev \ | ||
llvm \ | ||
python3-dev \ | ||
libpython3-dev \ | ||
ocl-icd-libopencl1 \ | ||
cmake \ | ||
pkg-config \ | ||
make \ | ||
ninja-build \ | ||
ocl-icd-libopencl1 \ | ||
ocl-icd-dev \ | ||
ocl-icd-opencl-dev \ | ||
libhwloc-dev \ | ||
clinfo \ | ||
dialog \ | ||
apt-utils \ | ||
libxml2-dev \ | ||
libclang-cpp-dev \ | ||
llvm-dev \ | ||
&& apt-get clean && rm -rf /var/lib/apt/lists/* | ||
|
||
# NVIDIA does not provide OpenCL passthru. | ||
# POCL supports a CUDA-based OpenCL driver | ||
RUN git clone https://github.com/pocl/pocl.git /pocl | ||
WORKDIR /pocl | ||
RUN git checkout v6.0 | ||
RUN mkdir build | ||
WORKDIR /pocl/build | ||
RUN cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/ -DENABLE_CUDA=ON .. && \ | ||
make -j && \ | ||
make install && \ | ||
rm -rf /pocl | ||
|
||
RUN echo 'ubuntu ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers | ||
|
||
USER ubuntu | ||
ENV HOME="/home/ubuntu" | ||
RUN mkdir -p ${HOME} | ||
WORKDIR ${HOME} | ||
|
||
# We want access to all of the GPUs but do not want to expose any CPU devices | ||
RUN echo "export POCL_DEVICES=cuda" >> ${HOME}/.bashrc | ||
|
||
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y | ||
RUN echo ". \"\$HOME/.cargo/env\"" >> ${HOME}/.bashrc | ||
|
||
RUN git clone --depth=1 https://github.com/pyenv/pyenv.git .pyenv | ||
ENV PYENV_ROOT="${HOME}/.pyenv" | ||
ENV PATH="${PYENV_ROOT}/shims:${PYENV_ROOT}/bin:${PATH}" | ||
RUN echo "export PYENV_ROOT=\"\$HOME/.pyenv\"" >> ${HOME}/.bashrc && \ | ||
echo "[[ -d \$PYENV_ROOT/bin ]] && export PATH="\$PYENV_ROOT/bin:\$PATH"" >> ${HOME}/.bashrc && \ | ||
echo "eval \"\$(pyenv init -)\"" >> ${HOME}/.bashrc && \ | ||
echo "\"$(pyenv virtualenv-init -)\"" >> ${HOME}/.bashrc | ||
|
||
RUN pyenv install 3.11 | ||
RUN pyenv global 3.11 | ||
RUN pip install --upgrade pip && pip cache purge | ||
|
||
CMD ["/bin/bash"] |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.