From 80a2f913ffbdafccb1ff5855569c71910c44d88b Mon Sep 17 00:00:00 2001 From: Keming Date: Mon, 10 Nov 2025 18:56:23 +0800 Subject: [PATCH 1/3] chore: bump lang & tools version Signed-off-by: Keming --- pkg/lang/ir/v1/conda.go | 4 ++-- pkg/lang/ir/v1/get_conda.sh | 7 ++----- pkg/lang/ir/v1/julia.sh | 8 ++++---- pkg/lang/ir/v1/pixi.go | 2 +- pkg/lang/ir/v1/shell.go | 15 ++++++++------- pkg/lang/ir/v1/uv.go | 2 +- 6 files changed, 18 insertions(+), 20 deletions(-) diff --git a/pkg/lang/ir/v1/conda.go b/pkg/lang/ir/v1/conda.go index 1290bf12b..e1a4d77f9 100644 --- a/pkg/lang/ir/v1/conda.go +++ b/pkg/lang/ir/v1/conda.go @@ -29,8 +29,8 @@ import ( const ( curlImage = "ghcr.io/curl/curl-container/curl-multi:8.17.0" - condaVersionDefault = "py311_25.1.1-2" - microMambaImage = "mambaorg/micromamba:2.0.6" + condaVersionDefault = "py311_25.9.1-1" + microMambaImage = "ghcr.io/mamba-org/micromamba:2.3.3-debian12-slim" condaRootPrefix = "/opt/conda" condaBinDir = "/opt/conda/bin" condaSourcePath = "/tmp/miniconda.sh" diff --git a/pkg/lang/ir/v1/get_conda.sh b/pkg/lang/ir/v1/get_conda.sh index 17c6caff4..8ac070236 100644 --- a/pkg/lang/ir/v1/get_conda.sh +++ b/pkg/lang/ir/v1/get_conda.sh @@ -2,13 +2,10 @@ set -euo pipefail && \ UNAME_M="$(uname -m)" && \ if [ "${UNAME_M}" = "x86_64" ]; then \ MINICONDA_URL="https://repo.anaconda.com/miniconda/Miniconda3-${CONDA_VERSION}-Linux-x86_64.sh"; \ - SHA256SUM="d8c1645776c0758214e4191c605abe5878002051316bd423f2b14b22d6cb4251"; \ -elif [ "${UNAME_M}" = "s390x" ]; then \ - MINICONDA_URL="https://repo.anaconda.com/miniconda/Miniconda3-${CONDA_VERSION}-Linux-s390x.sh"; \ - SHA256SUM="0b4d5a3f16dcb2d230ba5dfdfdb848c854006aab6dd1bd3dbf29fcddf04b07a4"; \ + SHA256SUM="238abad23f8d4d8ba89dd05df0b0079e278909a36e06955f12bbef4aa94e6131"; \ elif [ "${UNAME_M}" = "aarch64" ]; then \ MINICONDA_URL="https://repo.anaconda.com/miniconda/Miniconda3-${CONDA_VERSION}-Linux-aarch64.sh"; \ - SHA256SUM="8a1d4407fce7ec552ac6ed655ce93d83549e02b819cacefbb7f640f9051e638b"; \ + SHA256SUM="4e0723b9d76aa491cf22511dac36f4fdec373e41d2a243ff875e19b8df39bf94"; \ fi && \ wget "${MINICONDA_URL}" -O /tmp/miniconda.sh && \ echo "${SHA256SUM} /tmp/miniconda.sh" > /tmp/shasum && \ diff --git a/pkg/lang/ir/v1/julia.sh b/pkg/lang/ir/v1/julia.sh index c5ba65cc2..416050358 100644 --- a/pkg/lang/ir/v1/julia.sh +++ b/pkg/lang/ir/v1/julia.sh @@ -1,11 +1,11 @@ set -o pipefail && \ UNAME_M="$(uname -m)" && \ if [ "${UNAME_M}" = "x86_64" ]; then \ - JULIA_URL="https://julialang-s3.julialang.org/bin/linux/x64/1.10/julia-1.10.8-linux-x86_64.tar.gz"; \ - SHA256SUM="0410175aeec3df63173c15187f2083f179d40596d36fd3a57819cc5f522ae735"; \ + JULIA_URL="https://julialang-s3.julialang.org/bin/linux/x64/1.10/julia-1.10.10-linux-x86_64.tar.gz"; \ + SHA256SUM="6a78a03a71c7ab792e8673dc5cedb918e037f081ceb58b50971dfb7c64c5bf81"; \ elif [ "{UNAME_M}" = "aarch64" ]; then \ - JULIA_URL="https://julialang-s3.julialang.org/bin/linux/aarch64/1.10/julia-1.10.8-linux-aarch64.tar.gz" \ - SHA256SUM="8d63dd12595a08edc736be8d6c4fea1840f137b81c62079d970dbd1be448b8cd"; \ + JULIA_URL="https://julialang-s3.julialang.org/bin/linux/aarch64/1.10/julia-1.10.10-linux-aarch64.tar.gz" \ + SHA256SUM="a4b157ed68da10471ea86acc05a0ab61c1a6931ee592a9b236be227d72da50ff"; \ fi && \ wget "${JULIA_URL}" -O /tmp/julia.tar.gz && \ diff --git a/pkg/lang/ir/v1/pixi.go b/pkg/lang/ir/v1/pixi.go index 29fa73874..0e590f10e 100644 --- a/pkg/lang/ir/v1/pixi.go +++ b/pkg/lang/ir/v1/pixi.go @@ -23,7 +23,7 @@ import ( ) const ( - pixiVersion = "0.48.0" + pixiVersion = "0.59.0" pixiConfigTemplate = ` {{- if .UsePixiMirror -}} [mirrors] diff --git a/pkg/lang/ir/v1/shell.go b/pkg/lang/ir/v1/shell.go index 771f158ab..0d77f9770 100644 --- a/pkg/lang/ir/v1/shell.go +++ b/pkg/lang/ir/v1/shell.go @@ -47,7 +47,7 @@ symbol = "Conda " [nodejs] symbol = "NodeJS " -[go] +[golang] symbol = "Go " [rust] @@ -77,8 +77,8 @@ renamed = "r" deleted = "x" ` - fishVersion = "4.0.1" - fishAssetURL = "https://github.com/fish-shell/fish-shell/releases/download/%[1]s/fish-static-$(uname -m)-%[1]s.tar.xz" + fishVersion = "4.2.0" + fishAssetURL = "https://github.com/fish-shell/fish-shell/releases/download/%[1]s/fish-%[1]s-linux-$(uname -m).tar.xz" ) func (g *generalGraph) compileShell(root llb.State) (_ llb.State, err error) { @@ -203,9 +203,10 @@ func (g generalGraph) compileFish(root llb.State) llb.State { ).Root() root = root.File( llb.Copy(builder, "/tmp/fish", "/usr/bin/fish"), - llb.WithCustomName("[internal] copy fish shell from the builder image")). - Run(llb.Shlex(`sh -c "echo yes | fish --install"`), - llb.WithCustomName("[internal] install fish shell")).Root() - + llb.WithCustomName("[internal] install fish shell"), + ).Run( + llb.Shlexf(`sh -c "mkdir -p %s"`, fileutil.EnvdHomeDir(".config/fish")), + llb.WithCustomName("[internal] init fish config dir"), + ).Root() return root } diff --git a/pkg/lang/ir/v1/uv.go b/pkg/lang/ir/v1/uv.go index b081df508..8ff741d80 100644 --- a/pkg/lang/ir/v1/uv.go +++ b/pkg/lang/ir/v1/uv.go @@ -17,7 +17,7 @@ package v1 import "github.com/moby/buildkit/client/llb" const ( - uvVersion = "0.7.10" + uvVersion = "0.9.8" ) func (g generalGraph) compileUV(root llb.State) llb.State { From 8ddffafaab818a393d3598c7f4bf4e8bd95bd441 Mon Sep 17 00:00:00 2001 From: Keming Date: Tue, 11 Nov 2025 10:11:47 +0800 Subject: [PATCH 2/3] use conda-forge as the default channel Signed-off-by: Keming --- e2e/language/others_test.go | 13 ++++++------- e2e/language/testdata/python/conda/env.yaml | 3 +-- pkg/lang/ir/v1/conda.go | 19 +++++++++++++++---- 3 files changed, 22 insertions(+), 13 deletions(-) diff --git a/e2e/language/others_test.go b/e2e/language/others_test.go index 0cd5ecc9b..f248ee862 100644 --- a/e2e/language/others_test.go +++ b/e2e/language/others_test.go @@ -29,18 +29,17 @@ var _ = Describe("rust", Ordered, func() { e := e2e.NewExample(e2e.BuildContextDirWithName(exampleName), testcase) BeforeAll(e.BuildImage(true)) BeforeEach(e.RunContainer()) - It("Should have go installed", func() { + It("Should have go/rust/nodejs installed", func() { + // go res, err := e.ExecRuntimeCommand("go version") Expect(err).To(BeNil()) Expect(res).To(ContainSubstring("go version")) - }) - It("Should have rust installed", func() { - res, err := e.ExecRuntimeCommand("rust version") + // rust + res, err = e.ExecRuntimeCommand("rust version") Expect(err).To(BeNil()) Expect(res).To(ContainSubstring("toolchain")) - }) - It("Should have nodejs installed", func() { - res, err := e.ExecRuntimeCommand("nodejs version") + // nodejs + res, err = e.ExecRuntimeCommand("nodejs version") Expect(err).To(BeNil()) Expect(res).To(ContainSubstring("v")) }) diff --git a/e2e/language/testdata/python/conda/env.yaml b/e2e/language/testdata/python/conda/env.yaml index 329719e5e..b12bba029 100644 --- a/e2e/language/testdata/python/conda/env.yaml +++ b/e2e/language/testdata/python/conda/env.yaml @@ -1,9 +1,8 @@ name: imarobot # should ignore this name channels: - conda-forge - - defaults dependencies: - babel - pip: - via - - -e . \ No newline at end of file + - -e . diff --git a/pkg/lang/ir/v1/conda.go b/pkg/lang/ir/v1/conda.go index e1a4d77f9..97bcb429a 100644 --- a/pkg/lang/ir/v1/conda.go +++ b/pkg/lang/ir/v1/conda.go @@ -37,7 +37,7 @@ const ( mambaRc = ` channels: - - defaults + - conda-forge ` mambaActivateBash = ` #!/bin/sh @@ -52,13 +52,22 @@ micromamba activate $argv condaActivateFish = ` #!/usr/bin/fish conda activate $argv +` + condaRc = ` +default_channels: + - https://conda.anaconda.org/conda-forge/ + +channels: + - conda-forge ` ) var ( // this file can be used by both conda and mamba // https://mamba.readthedocs.io/en/latest/user_guide/configuration.html#multiple-rc-files - condarc = "/opt/conda/.condarc" + condaRcFilePath = "/opt/conda/.condarc" + // this file should only affect the current conda envd environments + condaRcEnvdFilePath = "/opt/conda/envs/envd/.condarc" //go:embed get_conda.sh downloadCondaBash string //go:embed install_conda.sh @@ -69,7 +78,7 @@ func (g generalGraph) compileCondaChannel(root llb.State) llb.State { if g.CondaConfig.CondaChannel != nil { logrus.WithField("conda-channel", *g.CondaChannel).Debug("using custom conda channel") stage := root. - File(llb.Mkfile(condarc, + File(llb.Mkfile(condaRcEnvdFilePath, 0644, []byte(*g.CondaChannel), llb.WithUIDGID(g.uid, g.gid)), llb.WithCustomName("[internal] setting conda channel")) return stage } @@ -186,7 +195,9 @@ func (g generalGraph) installMiniConda(root llb.State) llb.State { llb.WithCustomName("[internal] install conda")).Root(). File(llb.Mkfile(fmt.Sprintf("%s/activate.fish", condaBinDir), 0755, []byte(condaActivateFish)), llb.WithCustomName("[internal] create the conda activate.fish file")). - File(llb.Rm(condaSourcePath), llb.WithCustomName("[internal] rm conda source file")) + File(llb.Rm(condaSourcePath), llb.WithCustomName("[internal] rm conda source file")). + File(llb.Mkfile(condaRcFilePath, 0644, []byte(condaRc), llb.WithUIDGID(g.uid, g.gid)), + llb.WithCustomName("[internal] create the conda rc file")) return conda } From 68cb99f9dd9f666a96346cfeed15469f552cc6f5 Mon Sep 17 00:00:00 2001 From: Keming Date: Tue, 11 Nov 2025 10:33:30 +0800 Subject: [PATCH 3/3] rm all the defaults channel in tests Signed-off-by: Keming --- e2e/language/testdata/python/conda_channel/build.envd | 1 - e2e/language/testdata/python/conda_channel/env.yaml | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/e2e/language/testdata/python/conda_channel/build.envd b/e2e/language/testdata/python/conda_channel/build.envd index 41017698e..aa19cf450 100644 --- a/e2e/language/testdata/python/conda_channel/build.envd +++ b/e2e/language/testdata/python/conda_channel/build.envd @@ -8,7 +8,6 @@ def build(): config.conda_channel( channel=""" channels: - - defaults - dglteam # dgllife in env.yaml only works if specify channels here """ ) diff --git a/e2e/language/testdata/python/conda_channel/env.yaml b/e2e/language/testdata/python/conda_channel/env.yaml index 849610dea..c7da4f1be 100644 --- a/e2e/language/testdata/python/conda_channel/env.yaml +++ b/e2e/language/testdata/python/conda_channel/env.yaml @@ -1,3 +1,3 @@ name: imarobot # should ignore this name dependencies: - - dgl \ No newline at end of file + - dgl