Last active
February 5, 2025 19:44
-
-
Save xuhdev/3af3b5bc3bbe8a24be130df8d53aa1d7 to your computer and use it in GitHub Desktop.
Containerized fishtest
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
# To build: | |
# | |
# podman build --no-cache -t fishtest . | |
# | |
# To run: | |
# | |
# podman run -it --rm fishtest <fishtest arguments> | |
# | |
# e.g., | |
# | |
# podman run -it --rm fishtest --concurrency=2 <username> <password> | |
FROM docker.io/alpine/git:latest as builder | |
WORKDIR /git | |
# Don't use | |
# wget -O fishtest.tar.gz https://github.com/official-stockfish/fishtest/archive/master.tar.gz | |
# because there's no checksum. | |
RUN git clone --depth=1 https://github.com/official-stockfish/fishtest.git && rm -rf fishtest/.git | |
FROM docker.io/gcc:latest | |
RUN apt-get update && apt-get install python3 | |
RUN addgroup --system --uid 999 fishtester | |
RUN adduser --system --uid 999 fishtester | |
COPY --from=builder --chown=fishtester:fishtester /git/fishtest/ /fishtest/ | |
WORKDIR /fishtest | |
# Must ensure fishtester can modify files. Thus we switch user early. | |
USER fishtester | |
ENTRYPOINT ["/usr/bin/python3", "worker/worker.py"] | |
CMD [] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment