feat: dev container support#248
Conversation
|
you can add uv to the dev container so the users can run tests |
@miyanyan Thank you for your advice, I will convert from apt to uv for python and python library management |
Yeah, they use uv for test clice/.github/workflows/cmake.yml Line 94 in 2ffab4f |
@aurora0x27 Thank you for your interest! |
|
There is an extra space in dockignore filename https://github.com/clice-io/clice/blob/main/%20.dockerignore, could you also fix it? |
Sure, I'll fix it together |
|
Update:
|
7a69af0 to
12e4fb7
Compare
|
Update:
clang toolchain and xmake cache are ready |
6de7172 to
f12efbc
Compare
|
[MileStone] Linux dev-container support is ready for use.
|
|
After discussions with @16bit-ykiko @star-hengxing, Stage1 dev-container will be a preview feature. |
1. python management changed from apt to uv 2. Parallel dependency install and download support 3. docker buildx cache for llvm-binary download 4. bug fix
…ke.lua refactor done) 2. Install exactly only one toolchain 3. Fixed async crash in dockerfile 4. Refactored package install sequence and source for build speed and avoid other compile tool chain installation
preinstall libstdc++, instead of libc++
Preparing to merge Stage1 done
Optimized xmake installation for faster and less download size Optimized xmake change readability
a7d8252 to
87a9e21
Compare
|
@16bit-ykiko Ready for merge, requesting review |
Removed useless cache options from scripts
|
/gemini summary |
|
/gemini review |
Summary of ChangesThis pull request introduces the foundational elements for development container support, specifically for Linux environments. The primary goal is to establish a consistent and reproducible build environment, simplifying setup for developers. It includes a Dockerfile for setting up a Linux development image with configurable compilers (GCC or Clang) and scripts to build and run these containers. Additionally, the changes centralize toolchain version definitions and enhance the project's build system to better manage external dependencies like LLVM. Highlights
Changelog
Activity
|
There was a problem hiding this comment.
Code Review
This pull request introduces excellent support for development containers, which will significantly streamline the setup process for new developers. The use of a multi-stage Dockerfile, build scripts, and the refactoring of xmake.lua to be data-driven are all great improvements. I've provided a few suggestions to enhance the robustness and maintainability of the new scripts and Dockerfile, focusing on removing redundant code, cleaning up log output, addressing a potentially risky bind mount, and clarifying a change in the xmake build policy.
|
There are two docker files, the Dockerfile(dev, linux + windows finally) in this pr, and https://github.com/clice-io/clice/blob/main/Dockerfile for release, is maintaining the two docker files the right way? It seems they have the same points, only the docker stage they are in is different. |
|
Remove this file https://github.com/clice-io/clice/blob/main/Dockerfile? |
|
@16bit-ykiko @miyanyan I plan to replace all builds including CI with dev-container, but not now. |
Currently I only finished linux Dockerfile and launch scripts
As for the plan, there is still a lot work to do:
How to try this preview version:
cd clice # clice project root dir
docker/linux/build.sh
docker/linux/run.sh