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 developer containers config #11

Merged
merged 2 commits into from
Jul 28, 2023

Conversation

aloisklink
Copy link
Contributor

Blocked by:


Add a basic Development Containers config that builds an Ubuntu 20.04 environment, and installs pdm and libirimager 4.1.1.

This is non-trivial, since libirimager has a broken postinstall script,that has to be manually removed to get everything working properly.


Once this is merged, we should be able to open up a development environment in GitHub Codespaces:

image

FYI, @AshleySetter, to review this, I recommend following the guide in https://code.visualstudio.com/docs/devcontainers/containers, by installing https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers.

(hint, set {"dev.containers.dockerPath": "podman", "dev.containers.dockerComposePath": "podman-compose"} in your VS Code settings so that you can use the superior podman instead of docker.)

Split up the definition and the declaration of the IRImager class.
Add a basic [Development Containers](https://containers.dev/) config
that builds an Ubuntu 20.04 environment, and installs
pdm and libirimager 4.4.1.

This is non-trivial, since libirimager has a broken postinstall script,
that has to be manually removed to get everything working properly.
@aloisklink aloisklink requested a review from AshleySetter July 25, 2023 17:06
RUN pip3 install pdm

# update the virtualenv with the latest version of pip that has been installed, required for PEP 621 support
RUN virtualenv --upgrade-embed-wheels
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI, apparently Python does this automatically, but only around once-a-week (which is the reason why you've probably never done it on your own laptop), so we have to manually force it to run if we want to use the latest pip features immediately.

Copy link
Contributor

@AshleySetter AshleySetter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, works great, haven't used dev-containers before, they're pretty cool!

@aloisklink
Copy link
Contributor Author

Looks good to me, works great, haven't used dev-containers before, they're pretty cool!

Yah, it does make creating a development environment much easier :)

It's probably overkill for most JavaScript or Python projects, but for C/C++ stuff where the dependencies are weird, it does seem helpful.

GitHub Codespaces is a pretty cool concept, but it's very very expensive: if I want something similar to my personal 16-core PC, it's $1.50 per hour for a 16-core machine. But, the CPU cores they have on GitHub Codespaces/GitHub Actions aren't great, and they tend to be very very old CPUs, so I might not even get the same level of performance if I go for a 32-core machine!!

So imagine like $500 a month per full-time worker!!

@aloisklink aloisklink marked this pull request as ready for review July 28, 2023 08:44
@aloisklink aloisklink merged commit f1962b5 into main Jul 28, 2023
@aloisklink aloisklink deleted the build/add-developer-containers-config branch July 28, 2023 08:45
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