-
Notifications
You must be signed in to change notification settings - Fork 8
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
Update docker build #16
Conversation
… include instructions for multi-architecture image builds
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, thanks!
Remind me what I need to do re: automatic building of these images?
./miniconda.sh -b -p /opt/conda && \ | ||
/opt/conda/bin/conda install -y python=$PYTHON_VERSION && \ | ||
/opt/conda/bin/conda clean -ya | ||
RUN case ${TARGETPLATFORM} in \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These days, I'd probably use uv and nothing else but we don't need to change this in this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would probably help save GitHub minutes too as the non-nethack parts are likely the majority of the build time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's uv?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm already using it in one of the tests, here.
It's from the ruff
developer and one of the many Rust-for-Python tools that massively speed up things these days.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On my M3 Mac, the Docker build takes 15 minutes and the image size is a chunky 23GB.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it faster the second time and we just have to cache the Docker layers?
Alternatively, I think the base image with CUDA is quite heavy.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is faster, but still takes nearly 10 minutes, most of the time is in RUN pip install '.[all]'
on amd64 (~400s). Rather strangely, the same step for arm64 only takes about 40s. I wonder is this due to me running the build on a Mac.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that's likely. Cross compilation is rather slow on arm MacBooks.
Depends on which solution we want to pursue, Docker Hub or GitHub Container Registry. For now I suggest letting users build their own Docker images per instructions and look to automating the image building to coincide with NLE-1.0.0. |
This PR updates the Docker Distribution capability