Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 0 additions & 26 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,32 +108,6 @@ jobs:
with:
skip-existing: true
verbose: true
envd_starship_publish:
name: Push starship image to Docker Hub
runs-on: ubuntu-latest
# only trigger on main repo when tag starts with v
if: github.repository == 'tensorchord/envd' && startsWith(github.ref, 'refs/tags/v')
needs: goreleaser
steps:
- uses: actions/checkout@v5
- name: Docker Login
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERIO_USERNAME }}
password: ${{ secrets.DOCKERIO_TOKEN }}
- name: Docker Setup QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push
uses: docker/build-push-action@v6
with:
push: true
file: base-images/envd-starship/envd-starship.Dockerfile
platforms: linux/amd64,linux/arm64
tags: tensorchord/starship:v0.0.1
cache-from: type=gha
cache-to: type=gha,mode=max
envd_image_push:
name: Build & push envd images
# only trigger on main repo when tag starts with v
Expand Down
6 changes: 0 additions & 6 deletions base-images/envd-starship/envd-starship.Dockerfile

This file was deleted.

2 changes: 1 addition & 1 deletion pkg/lang/ir/v1/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const (
)

func (g generalGraph) installAgentCodex(root llb.State, agent ir.CodeAgent) llb.State {
base := llb.Image(builderImage)
base := llb.Image(curlImage)
version := codexDefaultVersion
if agent.Version != nil {
version = *agent.Version
Expand Down
4 changes: 2 additions & 2 deletions pkg/lang/ir/v1/conda.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
)

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

func (g generalGraph) installMiniConda(root llb.State) llb.State {
base := llb.Image(builderImage)
base := llb.Image(curlImage)
builder := base.AddEnv("CONDA_VERSION", condaVersionDefault).
Run(llb.Shlexf("sh -c '%s'", downloadCondaBash),
llb.WithCustomName("[internal] download conda")).Root()
Expand Down
2 changes: 1 addition & 1 deletion pkg/lang/ir/v1/golang.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func (g *generalGraph) installGolang(root llb.State, version *string) llb.State
goVersion = *version
}

base := llb.Image(builderImage)
base := llb.Image(curlImage)
builder := base.Run(
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),
llb.WithCustomNamef("[internal] download go %s", goVersion),
Expand Down
2 changes: 1 addition & 1 deletion pkg/lang/ir/v1/julia.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ var downloadJuliaBashScript string
// getJuliaBinary returns the llb.State only after setting up Julia environment
// A successful run of getJuliaBinary should set up the Julia environment
func (g generalGraph) getJuliaBinary(root llb.State) llb.State {
base := llb.Image(builderImage)
base := llb.Image(curlImage)
builder := base.
Run(llb.Shlexf("sh -c '%s'", downloadJuliaBashScript),
llb.WithCustomName("[internal] downloading julia binary")).Root()
Expand Down
2 changes: 1 addition & 1 deletion pkg/lang/ir/v1/nodejs.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func (g *generalGraph) installNodeJS(root llb.State, version *string) llb.State
nodejsVersion = *version
}

base := llb.Image(builderImage)
base := llb.Image(curlImage)
builder := base.Run(
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),
llb.WithCustomNamef("[internal] download nodejs %s", nodejsVersion),
Expand Down
2 changes: 1 addition & 1 deletion pkg/lang/ir/v1/pixi.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func (g generalGraph) compilePixi(root llb.State) llb.State {
return root
}

base := llb.Image(builderImage)
base := llb.Image(curlImage)
builder := base.Run(
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),
llb.WithCustomNamef("[internal] download pixi %s", pixiVersion),
Expand Down
2 changes: 1 addition & 1 deletion pkg/lang/ir/v1/rust.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const (
)

func (g *generalGraph) installRust(root llb.State, version *string) llb.State {
base := llb.Image(builderImage)
base := llb.Image(curlImage)
builder := base.Run(
llb.Shlexf(`sh -c "curl --proto '=https' --tlsv1.2 -sSf -o %s https://sh.rustup.rs"`, rustUpInitFilePath),
llb.WithCustomName("[internal] download rustup-init.sh"),
Expand Down
23 changes: 22 additions & 1 deletion pkg/lang/ir/v1/shell.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,27 @@ symbol = "sudo "
[python]
symbol = "Py "

[pixi]
symbol = "Pixi "

[conda]
symbol = "Conda "

[nodejs]
symbol = "NodeJS "

[go]
symbol = "Go "

[rust]
symbol = "Rust "

[julia]
symbol = "Julia∴ "

[rlang]
symbol = "R "

[status]
format = '[\[$status:$common_meaning$signal_name\]]($style) '
disabled = false
Expand Down Expand Up @@ -174,7 +195,7 @@ func (g generalGraph) compileZSH(root llb.State) (llb.State, error) {
}

func (g generalGraph) compileFish(root llb.State) llb.State {
base := llb.Image(builderImage)
base := llb.Image(curlImage)
url := fmt.Sprintf(fishAssetURL, fishVersion)
builder := base.Run(
llb.Shlexf(`sh -c "wget -qO- %s | tar -xJf - -C /tmp || exit 1"`, url),
Expand Down
37 changes: 37 additions & 0 deletions pkg/lang/ir/v1/starship.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
// Copyright 2025 The envd Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package v1

import (
"github.com/moby/buildkit/client/llb"
)

const (
starshipDefaultVersion = "1.24.0"
)

func (g generalGraph) compileStarship(root llb.State) llb.State {
base := llb.Image(curlImage)
builder := base.Run(
llb.Shlexf(`sh -c "wget -qO- https://github.com/starship/starship/releases/download/v%s/starship-$(uname -m)-unknown-linux-musl.tar.gz | tar -xz -C /tmp || exit 1"`, starshipDefaultVersion),
llb.WithCustomNamef("[internal] download starship %s", starshipDefaultVersion),
).Root()

root = root.File(
llb.Copy(builder, "/tmp/starship", "/usr/local/bin/starship"),
llb.WithCustomNamef("[internal] install starship %s", starshipDefaultVersion),
)
return root
}
8 changes: 0 additions & 8 deletions pkg/lang/ir/v1/system.go
Original file line number Diff line number Diff line change
Expand Up @@ -247,14 +247,6 @@ func (g *generalGraph) compileDevPackages(root llb.State) llb.State {
return run.Root()
}

func (g generalGraph) compileStarship(root llb.State) llb.State {
starship := root.File(llb.Copy(
llb.Image(types.EnvdStarshipImage), "/usr/local/bin/starship", "/usr/local/bin/starship",
&llb.CopyInfo{CreateDestPath: true}),
llb.WithCustomName(fmt.Sprintf("[internal] add envd-starship from %s", types.EnvdStarshipImage)))
return starship
}

func (g generalGraph) compileSSHD(root llb.State) llb.State {
sshd := root.File(llb.Copy(
llb.Image(types.EnvdSshdImage), "/usr/bin/envd-sshd", "/var/envd/bin/envd-sshd",
Expand Down
2 changes: 1 addition & 1 deletion pkg/lang/ir/v1/uv.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func (g generalGraph) compileUV(root llb.State) llb.State {
g.RuntimeEnviron["UV_LINK_MODE"] = "copy"
g.RuntimeEnviron["UV_PYTHON_PREFERENCE"] = "only-managed"

base := llb.Image(builderImage)
base := llb.Image(curlImage)
builder := base.Run(
llb.Shlexf(`sh -c "wget -qO- https://github.com/astral-sh/uv/releases/download/%s/uv-$(uname -m)-unknown-linux-gnu.tar.gz | tar -xz --strip-components=1 -C /tmp || exit 1"`, uvVersion),
llb.WithCustomNamef("[internal] download uv %s", uvVersion),
Expand Down
3 changes: 1 addition & 2 deletions pkg/types/envd.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ const (
DefaultCondaPath = "/opt/conda/envs/envd/bin:/opt/conda/bin:/home/envd/.local/bin"
DefaultJuliaPath = "/usr/local/julia/bin"
// image
PythonBaseImage = "ubuntu:22.04"
EnvdStarshipImage = "tensorchord/starship:v0.0.1"
PythonBaseImage = "ubuntu:22.04"
// supervisor
HorustImage = "ghcr.io/federicoponzi/horust:0.1.11"
HorustServiceDir = "/etc/horust/services"
Expand Down
Loading