Skip to content

Commit

Permalink
chore(CLI): test new release for envd-sshd (#866)
Browse files Browse the repository at this point in the history
* chore(CLI): Rename envd-ssh to envd-sshd

Signed-off-by: Yuedong Wu <dwcn22@outlook.com>

* trim whitespaces

Signed-off-by: Yuedong Wu <dwcn22@outlook.com>

Signed-off-by: Yuedong Wu <dwcn22@outlook.com>
  • Loading branch information
lunarwhite authored and gaocegege committed Sep 11, 2022
1 parent c562041 commit f1b3fe5
Show file tree
Hide file tree
Showing 11 changed files with 27 additions and 27 deletions.
28 changes: 14 additions & 14 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ builds:
goos:
- linux
- darwin
id: envd-ssh
main: ./cmd/envd-ssh
binary: envd-ssh
id: envd-sshd
main: ./cmd/envd-sshd
binary: envd-sshd
ldflags:
- -s -w
- -X github.com/tensorchord/envd/pkg/version.version={{ .Version }}
Expand All @@ -44,10 +44,10 @@ archives:
windows: Windows
386: i386
amd64: x86_64
- id: envd-ssh
- id: envd-sshd
format: binary
builds:
- envd-ssh
- envd-sshd
replacements:
darwin: Darwin
linux: Linux
Expand All @@ -69,27 +69,27 @@ changelog:
- '^chore:'
dockers:
- image_templates:
- "ghcr.io/tensorchord/envd-ssh-from-scratch:{{ .Version }}-amd64"
- "ghcr.io/tensorchord/envd-sshd-from-scratch:{{ .Version }}-amd64"
use: buildx
dockerfile: .goreleaser/envd-ssh.Dockerfile
dockerfile: .goreleaser/envd-sshd.Dockerfile
ids:
- envd-ssh
- envd-sshd
build_flag_templates:
- "--platform=linux/amd64"
- image_templates:
- "ghcr.io/tensorchord/envd-ssh-from-scratch:{{ .Version }}-arm64v8"
- "ghcr.io/tensorchord/envd-sshd-from-scratch:{{ .Version }}-arm64v8"
use: buildx
goarch: arm64
ids:
- envd-ssh
dockerfile: .goreleaser/envd-ssh.Dockerfile
- envd-sshd
dockerfile: .goreleaser/envd-sshd.Dockerfile
build_flag_templates:
- "--platform=linux/arm64/v8"
docker_manifests:
- name_template: ghcr.io/tensorchord/envd-ssh-from-scratch:{{ .Version }}
- name_template: ghcr.io/tensorchord/envd-sshd-from-scratch:{{ .Version }}
image_templates:
- ghcr.io/tensorchord/envd-ssh-from-scratch:{{ .Version }}-amd64
- ghcr.io/tensorchord/envd-ssh-from-scratch:{{ .Version }}-arm64v8
- ghcr.io/tensorchord/envd-sshd-from-scratch:{{ .Version }}-amd64
- ghcr.io/tensorchord/envd-sshd-from-scratch:{{ .Version }}-arm64v8
brews:
- name: envd
ids:
Expand Down
2 changes: 0 additions & 2 deletions .goreleaser/envd-ssh.Dockerfile

This file was deleted.

2 changes: 2 additions & 0 deletions .goreleaser/envd-sshd.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
FROM scratch
COPY envd-sshd /usr/bin/envd-sshd
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
ROOT := github.com/tensorchord/envd

# Target binaries. You can build multiple binaries for a single project.
TARGETS := envd envd-ssh
TARGETS := envd envd-sshd

# Container image prefix and suffix added to targets.
# The final built images are:
Expand Down
8 changes: 4 additions & 4 deletions base-images/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,27 +24,27 @@ docker run --rm --privileged multiarch/qemu-user-static --reset -p yes

docker buildx build \
--build-arg ENVD_VERSION=${ENVD_VERSION} \
--build-arg ENVD_SSH_IMAGE=ghcr.io/tensorchord/envd-ssh-from-scratch \
--build-arg ENVD_SSH_IMAGE=ghcr.io/tensorchord/envd-sshd-from-scratch \
--pull --push --platform linux/x86_64,linux/arm64 \
-t ${DOCKER_HUB_ORG}/python:${PYTHON_VERSION}-${ENVD_OS}-envd-${DOCKER_IMAGE_TAG} \
-f python${PYTHON_VERSION}-${ENVD_OS}.Dockerfile .
docker buildx build --build-arg IMAGE_NAME=docker.io/nvidia/cuda \
--build-arg ENVD_VERSION=${ENVD_VERSION} \
--build-arg ENVD_SSH_IMAGE=ghcr.io/tensorchord/envd-ssh-from-scratch \
--build-arg ENVD_SSH_IMAGE=ghcr.io/tensorchord/envd-sshd-from-scratch \
--pull --push --platform linux/x86_64,linux/arm64 \
-t ${DOCKER_HUB_ORG}/python:${PYTHON_VERSION}-${ENVD_OS}-cuda11.2-cudnn8-envd-${DOCKER_IMAGE_TAG} \
-f python${PYTHON_VERSION}-${ENVD_OS}-cuda11.2.Dockerfile .

# TODO(gaocegege): Support linux/arm64
docker buildx build \
--build-arg ENVD_VERSION=${ENVD_VERSION} \
--build-arg ENVD_SSH_IMAGE=ghcr.io/tensorchord/envd-ssh-from-scratch \
--build-arg ENVD_SSH_IMAGE=ghcr.io/tensorchord/envd-sshd-from-scratch \
-t ${DOCKER_HUB_ORG}/r-base:${RLANG_VERSION}-envd-${DOCKER_IMAGE_TAG} \
--pull --push --platform linux/x86_64 \
-f r${RLANG_VERSION}.Dockerfile .
docker buildx build \
--build-arg ENVD_VERSION=${ENVD_VERSION} \
--build-arg ENVD_SSH_IMAGE=ghcr.io/tensorchord/envd-ssh-from-scratch \
--build-arg ENVD_SSH_IMAGE=ghcr.io/tensorchord/envd-sshd-from-scratch \
-t ${DOCKER_HUB_ORG}/julia:${JULIA_VERSION}-${ENVD_OS}-envd-${DOCKER_IMAGE_TAG} \
--pull --push --platform linux/x86_64,linux/arm64 \
-f julia${JULIA_VERSION}-${ENVD_OS}.Dockerfile .
Expand Down
2 changes: 1 addition & 1 deletion base-images/julia1.8rc1-ubuntu20.04.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ RUN apt-get update && \
# prompt
&& curl --proto '=https' --tlsv1.2 -sSf https://starship.rs/install.sh | sh -s -- -y

COPY --from=envd /usr/bin/envd-ssh /var/envd/bin/envd-ssh
COPY --from=envd /usr/bin/envd-sshd /var/envd/bin/envd-sshd

ENV JULIA_PATH /usr/local/julia
ENV PATH $JULIA_PATH/bin:$PATH
Expand Down
2 changes: 1 addition & 1 deletion base-images/python3.9-ubuntu20.04-cuda11.2.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ RUN apt-get update && \
# prompt
&& curl --proto '=https' --tlsv1.2 -sSf https://starship.rs/install.sh | sh -s -- -y

COPY --from=envd /usr/bin/envd-ssh /var/envd/bin/envd-ssh
COPY --from=envd /usr/bin/envd-sshd /var/envd/bin/envd-sshd
2 changes: 1 addition & 1 deletion base-images/python3.9-ubuntu20.04.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ RUN apt-get update && \
# prompt
&& curl --proto '=https' --tlsv1.2 -sSf https://starship.rs/install.sh | sh -s -- -y

COPY --from=envd /usr/bin/envd-ssh /var/envd/bin/envd-ssh
COPY --from=envd /usr/bin/envd-sshd /var/envd/bin/envd-sshd
2 changes: 1 addition & 1 deletion base-images/r4.2.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ RUN set -x && \
dpkg -i "$DOWNLOAD_FILE" && \
rm ${DOWNLOAD_FILE} && rm -f /var/lib/rstudio-server/secure-cookie-key

COPY --from=envd /usr/bin/envd-ssh /var/envd/bin/envd-ssh
COPY --from=envd /usr/bin/envd-sshd /var/envd/bin/envd-sshd
2 changes: 1 addition & 1 deletion cmd/envd-ssh/main.go → cmd/envd-sshd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func main() {
}

app := cli.NewApp()
app.Name = "envd-ssh"
app.Name = "envd-sshd"
app.Usage = "ssh server for envd"
app.Version = version.GetVersion().String()
app.Flags = []cli.Flag{
Expand Down
2 changes: 1 addition & 1 deletion pkg/lang/ir/compile.go
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ func (g Graph) GetEntrypoint(buildContextDir string) ([]string, error) {
}

template := `set -e
/var/envd/bin/envd-ssh --authorized-keys %s --port %d --shell %s &
/var/envd/bin/envd-sshd --authorized-keys %s --port %d --shell %s &
%s
wait -n`

Expand Down

0 comments on commit f1b3fe5

Please sign in to comment.