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

Initial Dockerfile for codespaces... #30

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

coatless
Copy link

@coatless coatless commented Mar 6, 2024

I've tried to keep this Dockerfile as minimal as possible. The target for the container is to quickly bootstrap contributing to mlpack via GitHub Codespaces.

Unlike the mlpack/mlpack and other containers in the repository, we're building this off of the universal devcontainer to lower the storage requirements associated with deployment on GitHub Codespaces following the "Getting the most out of your included usage".

@coatless coatless marked this pull request as draft March 6, 2024 23:01
@coatless
Copy link
Author

coatless commented Mar 7, 2024

Welp, this isn't minimal at all in terms of the base image. Building onto the container with just a few items causes the image to exceed what's available on GH Action Builder to create a modified image. Plus, I can't build the image locally due to it rejecting arm64 😢

So, my thought here is to move away from the universal as a base image or lobotomize the container of .NET/Java/PHP/ ... :

https://github.com/devcontainers/images/blob/main/src/universal/history/2.9.0.md

There are other containers, but we're stuck with a container that uses the Universal ID if we want it to work 👎 .

Any preference @rcurtin ?

@rcurtin
Copy link
Member

rcurtin commented Mar 7, 2024

Do you think I could build it locally and push it? It's ok with me if each container needs to be handbuilt and pushed to Dockerhub to be updated---that's already what we do for containers when mlpack versions get bumped.

Happy to try it. I do have an OS X arm64 (M1 or M2, can't remember) system I could use to build that version.

@coatless
Copy link
Author

coatless commented Mar 8, 2024

So, the hiccup building locally was the base universal is linux/amd64 and doesn't play nicely with M-series macs (linux/arm64). Though, under buildx build emulation, I snagged a viable image now on DockerHub.

docker buildx build --platform=linux/amd64 -t mlpack-codespace .

I'll have time to check the image later today that this Dockerfile generated.

@rcurtin
Copy link
Member

rcurtin commented Mar 8, 2024

Awesome! If that works, I can push it to the mlpack Dockerhub account too.

@rcurtin
Copy link
Member

rcurtin commented Jun 26, 2024

@coatless just a ping on this one---let me know if I can be helpful in keeping things moving here. 👍

@coatless
Copy link
Author

@rcurtin at the moment, the slow down is more or less an internet cap by lovely Comcast. I can only really push docker builds and validate at end of month or if I know I'm going to be on a stable fast internet connection elsewhere.

Build R based on the official instructions
Retrieve required packages for development through r2u
1. LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 6, 68)

And

2. JSONArgsRecommended: JSON arguments recommended for CMD to prevent unintended behavior related to OS signals (line 69)
@rcurtin
Copy link
Member

rcurtin commented Jul 24, 2024

Ha, could you borrow Red Rock's wireless? 😄 I can provide a system you can ssh to that has docker on it and no bandwidth cap, so if that would help fix the issue for you (or rather just work around the awful that is Comcast...) just let me know.

@coatless coatless marked this pull request as ready for review July 25, 2024 17:58
@coatless
Copy link
Author

@rcurtin coffee shop wireless with a 10gb image is painfully slow. So, if you have a spare box that I can SSH into for this, I'd be game.

The next steps in this process:

  1. Check that everyone is happy with the above Dockerfile
  2. Place the image underneath MLPACK's docker hub: https://hub.docker.com/u/mlpack
  3. Document in the main repo: Add devcontainer mlpack#3637

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants