Skip to content

Commit

Permalink
add vulkan-1.1 docker environment
Browse files Browse the repository at this point in the history
  • Loading branch information
ghostplant committed Oct 26, 2023
1 parent bf22d79 commit c91eb11
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ BACKEND = $(shell ./antares/get_backend.sh)

PARAMS ?= docker run -v $(shell pwd):/antares -w /antares --privileged -v /:/host \
--shm-size=1g --ulimit memlock=-1 --ulimit stack=67108864 \
-v $(shell dirname `find /usr/lib/ -name libnvidia-ptxjitcompiler.so` 2>/dev/null | tail -n 1)/libnvidia-ptxjitcompiler.so:/usr/local/nvidia/lib64/libnvidia-ptxjitcompiler.so \
-v $(shell dirname `find /usr/lib/ -name libcuda.so.1` 2>/dev/null | tail -n 1)/libcuda.so.1:/usr/local/nvidia/lib64/libcuda.so.1 \
-v $(shell dirname `find /usr/lib/ -name libnvidia-ptxjitcompiler.so` 2>/dev/null | tail -n 1):/usr/local/nvidia/lib64 \
-v $(shell dirname `find /usr/lib/ -name libcuda.so.1` 2>/dev/null | tail -n 1)/libcuda.so.1:/usr/lib/x86_64-linux-gnu/libcuda.so.1 \
-v $(shell pwd)/.libAntares:/root/.cache/antares \
-v $(shell pwd)/public/roc_prof:/usr/local/bin/rp -e CPU_THREADS=$(CPU_THREADS) -e ANTARES_ROOT=/antares -e BATCH=$(BATCH) -e AB_DEBUG=$(AB_DEBUG) -e INIT_CONFIG='$(value INIT_CONFIG)' \
-e STEP=$(STEP) -e AGENT_URL='$(value AGENT_URL)' -e TUNER=$(TUNER) -e CONFIG='$(value CONFIG)' -e BACKEND=$(BACKEND) -e COMPUTE_V1='$(value COMPUTE_V1)' \
Expand Down
1 change: 1 addition & 0 deletions backends/c-vulkan/default_props.cfg
36 changes: 36 additions & 0 deletions docker/Dockerfile.c-vulkan
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
FROM nvidia/vulkan:1.1.121

ENV DEBIAN_FRONTEND noninteractive
ENV PYTHONDONTWRITEBYTECODE 1
ENV PATH $PATH:/usr/local/nvidia/lib64/bin
ENV LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH

RUN env > /etc/environment

RUN rm -f /etc/apt/sources.list.d/*

RUN apt-get update && apt install -y --no-install-recommends git ca-certificates \
python3-distutils python3.8-dev vulkan-utils libvulkan-dev g++-8 \
vim-tiny less netcat-openbsd inetutils-ping curl patch iproute2 \
g++ libpci3 libnuma-dev make file openssh-server kmod gdb libopenmpi-dev openmpi-bin psmisc \
autoconf automake autotools-dev libtool \
zlib1g-dev rename zip unzip librdmacm-dev gnupg \
&& apt-get clean && rm -rf /var/lib/apt/lists/*

RUN ln -sf /usr/bin/g++-8 /usr/bin/g++
RUN ln -sf /usr/bin/gcc-8 /usr/bin/gcc
RUN ln -sf /usr/bin/gcc /usr/bin/x86_64-linux-gnu-gcc

RUN ln -sf python3.8 /usr/bin/python3
RUN ln -sf python3 /usr/bin/python
RUN ln -sf python /usr/bin/python.exe
RUN curl -LO https://bootstrap.pypa.io/get-pip.py && python3 get-pip.py && rm -f get-pip.py

RUN /bin/echo -e "set backspace=indent,eol,start\nset nocompatible\nset ts=4" > /etc/vim/vimrc.tiny

ENV LD_LIBRARY_PATH=/usr/local/nvidia/lib64:$LD_LIBRARY_PATH
RUN pip3 install --upgrade antares && mkdir -p /root/.local/antares && mv $(antares pwd)/../3rdparty /root/.local/antares/3rdparty && pip3 uninstall antares -y && echo 'exec /antares/main.py "$@"' > /usr/local/bin/antares && chmod a+x /usr/local/bin/antares

RUN python3 -m pip install cython
RUN python3 -m pip install torch==2.0.0 --index-url https://download.pytorch.org/whl/cpu
RUN python3 -m pip install setuptools

0 comments on commit c91eb11

Please sign in to comment.