-
Notifications
You must be signed in to change notification settings - Fork 130
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
Call the engine binaries by absolute path. #1363
Conversation
One complication with the docker image is, that it apparently has no permanent storage to preserve the config file. So each time it is run it will have a different |
It seems to be not very difficult to have the worker directory outside the container and map it to a directory inside the container |
It's not so straightforward though since you cannot mount something while building an image. |
Can declare a docker volume. |
As I understand it you can mount something while creating the container, but not while building the image. |
@noobpwnftw Actually now I understand what you are saying. Mounting an empty volume over a directory in the container causes the files in the directory to be copied to the volume. This then becomes permanent storage. Thanks! |
This is the command I use to run the image by @Dantist with permanent storage
The volume
Pretty convenient actually. Given that this will work on all OS'es that docker supports. EDIT. It is not necessary to create the volume |
Interestingly the same volume can be mounted by two docker containers, so that effectively two workers share the same directory. The current lockfile implementation is defeated as the two workers have the same PID (in different containers). This can be solved by including the hostname in the lockfile (besides the PID). |
See #1364 |
There is no a cutechess-cli binary that works in the docker image and that does not need the PR. See #1362 . This is a better solution. So I am closing this PR. |
Containerized worker is always nice to have. PID isolation can be disabled by running the container with |
@noobpwnftw Thanks! The —pid option would indeed prevent two workers from running in the same directory. |
This should fix the docker image built by @Dantist. See #1360 .
The instructions for rebuilding the image are in Dockerfile. Since this PR has not been committed yet I could not test the rebuilding. However I applied the PR manually (after starting the container) and it worked!