Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add docker env #934

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions docker/compose.yaml
Original file line number Diff line number Diff line change
@@ -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
18 changes: 18 additions & 0 deletions docker/katrain_tensorrt.DockerFile
Original file line number Diff line number Diff line change
@@ -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" ]