Skip to content

Commit 938a88a

Browse files
authored
refactor: use curl ghcr image, install starshp from gh release (#2061)
* refactor: use curl ghcr image, install starshp from gh release Signed-off-by: Keming <kemingyang@tensorchord.ai> * rm starship image & ci Signed-off-by: Keming <kemingyang@tensorchord.ai> * update starship prompt config Signed-off-by: Keming <kemingyang@tensorchord.ai> --------- Signed-off-by: Keming <kemingyang@tensorchord.ai>
1 parent 963f95c commit 938a88a

14 files changed

Lines changed: 69 additions & 52 deletions

File tree

.github/workflows/release.yml

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -108,32 +108,6 @@ jobs:
108108
with:
109109
skip-existing: true
110110
verbose: true
111-
envd_starship_publish:
112-
name: Push starship image to Docker Hub
113-
runs-on: ubuntu-latest
114-
# only trigger on main repo when tag starts with v
115-
if: github.repository == 'tensorchord/envd' && startsWith(github.ref, 'refs/tags/v')
116-
needs: goreleaser
117-
steps:
118-
- uses: actions/checkout@v5
119-
- name: Docker Login
120-
uses: docker/login-action@v3
121-
with:
122-
username: ${{ secrets.DOCKERIO_USERNAME }}
123-
password: ${{ secrets.DOCKERIO_TOKEN }}
124-
- name: Docker Setup QEMU
125-
uses: docker/setup-qemu-action@v3
126-
- name: Set up Docker Buildx
127-
uses: docker/setup-buildx-action@v3
128-
- name: Build and push
129-
uses: docker/build-push-action@v6
130-
with:
131-
push: true
132-
file: base-images/envd-starship/envd-starship.Dockerfile
133-
platforms: linux/amd64,linux/arm64
134-
tags: tensorchord/starship:v0.0.1
135-
cache-from: type=gha
136-
cache-to: type=gha,mode=max
137111
envd_image_push:
138112
name: Build & push envd images
139113
# only trigger on main repo when tag starts with v

base-images/envd-starship/envd-starship.Dockerfile

Lines changed: 0 additions & 6 deletions
This file was deleted.

pkg/lang/ir/v1/agent.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const (
2525
)
2626

2727
func (g generalGraph) installAgentCodex(root llb.State, agent ir.CodeAgent) llb.State {
28-
base := llb.Image(builderImage)
28+
base := llb.Image(curlImage)
2929
version := codexDefaultVersion
3030
if agent.Version != nil {
3131
version = *agent.Version

pkg/lang/ir/v1/conda.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import (
2828
)
2929

3030
const (
31-
builderImage = "curlimages/curl:8.11.1"
31+
curlImage = "ghcr.io/curl/curl-container/curl-multi:8.17.0"
3232
condaVersionDefault = "py311_25.1.1-2"
3333
microMambaImage = "mambaorg/micromamba:2.0.6"
3434
condaRootPrefix = "/opt/conda"
@@ -173,7 +173,7 @@ func (g *generalGraph) installConda(root llb.State) llb.State {
173173
}
174174

175175
func (g generalGraph) installMiniConda(root llb.State) llb.State {
176-
base := llb.Image(builderImage)
176+
base := llb.Image(curlImage)
177177
builder := base.AddEnv("CONDA_VERSION", condaVersionDefault).
178178
Run(llb.Shlexf("sh -c '%s'", downloadCondaBash),
179179
llb.WithCustomName("[internal] download conda")).Root()

pkg/lang/ir/v1/golang.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ func (g *generalGraph) installGolang(root llb.State, version *string) llb.State
3030
goVersion = *version
3131
}
3232

33-
base := llb.Image(builderImage)
33+
base := llb.Image(curlImage)
3434
builder := base.Run(
3535
llb.Shlexf(`sh -c "wget -qO %s https://go.dev/dl/go%s.linux-$(uname -m | sed -e 's/x86_64/amd64/' -e 's/aarch64/arm64/').tar.gz"`, golangFilePath, goVersion),
3636
llb.WithCustomNamef("[internal] download go %s", goVersion),

pkg/lang/ir/v1/julia.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ var downloadJuliaBashScript string
3636
// getJuliaBinary returns the llb.State only after setting up Julia environment
3737
// A successful run of getJuliaBinary should set up the Julia environment
3838
func (g generalGraph) getJuliaBinary(root llb.State) llb.State {
39-
base := llb.Image(builderImage)
39+
base := llb.Image(curlImage)
4040
builder := base.
4141
Run(llb.Shlexf("sh -c '%s'", downloadJuliaBashScript),
4242
llb.WithCustomName("[internal] downloading julia binary")).Root()

pkg/lang/ir/v1/nodejs.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ func (g *generalGraph) installNodeJS(root llb.State, version *string) llb.State
3232
nodejsVersion = *version
3333
}
3434

35-
base := llb.Image(builderImage)
35+
base := llb.Image(curlImage)
3636
builder := base.Run(
3737
llb.Shlexf(`sh -c "mkdir %[1]s && wget -qO- https://nodejs.org/download/release/v%[2]s/node-v%[2]s-linux-$(uname -m | sed -e 's/x86_64/x64/').tar.xz | tar -xJ --strip-components=1 -C %[1]s || exit 1"`, nodejsTempDir, nodejsVersion),
3838
llb.WithCustomNamef("[internal] download nodejs %s", nodejsVersion),

pkg/lang/ir/v1/pixi.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ func (g generalGraph) compilePixi(root llb.State) llb.State {
4646
return root
4747
}
4848

49-
base := llb.Image(builderImage)
49+
base := llb.Image(curlImage)
5050
builder := base.Run(
5151
llb.Shlexf(`sh -c "wget -qO- https://github.com/prefix-dev/pixi/releases/download/v%s/pixi-$(uname -m)-unknown-linux-musl.tar.gz | tar -xz -C /tmp || exit 1"`, pixiVersion),
5252
llb.WithCustomNamef("[internal] download pixi %s", pixiVersion),

pkg/lang/ir/v1/rust.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const (
2525
)
2626

2727
func (g *generalGraph) installRust(root llb.State, version *string) llb.State {
28-
base := llb.Image(builderImage)
28+
base := llb.Image(curlImage)
2929
builder := base.Run(
3030
llb.Shlexf(`sh -c "curl --proto '=https' --tlsv1.2 -sSf -o %s https://sh.rustup.rs"`, rustUpInitFilePath),
3131
llb.WithCustomName("[internal] download rustup-init.sh"),

pkg/lang/ir/v1/shell.go

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,27 @@ symbol = "sudo "
3838
[python]
3939
symbol = "Py "
4040
41+
[pixi]
42+
symbol = "Pixi "
43+
44+
[conda]
45+
symbol = "Conda "
46+
47+
[nodejs]
48+
symbol = "NodeJS "
49+
50+
[go]
51+
symbol = "Go "
52+
53+
[rust]
54+
symbol = "Rust "
55+
56+
[julia]
57+
symbol = "Julia∴ "
58+
59+
[rlang]
60+
symbol = "R "
61+
4162
[status]
4263
format = '[\[$status:$common_meaning$signal_name\]]($style) '
4364
disabled = false
@@ -174,7 +195,7 @@ func (g generalGraph) compileZSH(root llb.State) (llb.State, error) {
174195
}
175196

176197
func (g generalGraph) compileFish(root llb.State) llb.State {
177-
base := llb.Image(builderImage)
198+
base := llb.Image(curlImage)
178199
url := fmt.Sprintf(fishAssetURL, fishVersion)
179200
builder := base.Run(
180201
llb.Shlexf(`sh -c "wget -qO- %s | tar -xJf - -C /tmp || exit 1"`, url),

0 commit comments

Comments
 (0)