diff --git a/docker/compose.yaml b/docker/compose.yaml new file mode 100755 index 000000000..486225b86 --- /dev/null +++ b/docker/compose.yaml @@ -0,0 +1,28 @@ +# docker compose file for running katrain,katago with tensorrt +# make sure run ```xhost +``` before running this docker-compose file to allow GUI access +services: + katrain: + build: + context: . + dockerfile: ./katrain_tensorrt.DockerFile + deploy: + resources: + reservations: + devices: + - driver: nvidia + count: 1 + capabilities: [gpu] + devices: + - "/dev/snd:/dev/snd" + ulimits: + memlock: + soft: -1 + hard: -1 + stack: + soft: 67108864 + hard: 67108864 + environment: + - DISPLAY=$DISPLAY + volumes: + - /tmp/.X11-unix:/tmp/.X11-unix + ipc: host \ No newline at end of file diff --git a/docker/katrain_tensorrt.DockerFile b/docker/katrain_tensorrt.DockerFile new file mode 100755 index 000000000..6133f8d8d --- /dev/null +++ b/docker/katrain_tensorrt.DockerFile @@ -0,0 +1,18 @@ +# set "Path to KataGo executable" as "./katago" in General and Engine settings +FROM nvcr.io/nvidia/tensorrt:23.04-py3 +ENV DEBIAN_FRONTEND noninteractive +RUN apt-get update +RUN apt-get install xclip -y +RUN apt-get install libsdl2-dev -y +RUN apt-get install zip -y +RUN apt-get install libmtdev-dev -y +RUN apt-get install ffmpeg -y +RUN apt-get install unzip -y +RUN apt-get install libzip5 -y +RUN pip install --upgrade pip +RUN pip install ffpyplayer +RUN pip install katrain +RUN wget https://github.com/lightvector/KataGo/releases/download/v1.14.1/katago-v1.14.1-trt8.6.1-cuda12.1-linux-x64.zip +RUN unzip ./katago-v1.14.1-trt8.6.1-cuda12.1-linux-x64.zip +#RUN rm ./katago-v1.14.1-trt8.6.1-cuda12.1-linux-x64.zip +CMD [ "katrain" ] \ No newline at end of file