GithubHelp home page GithubHelp logo

tensorchord / envd-server Goto Github PK

View Code? Open in Web Editor NEW
21.0 8.0 13.0 958 KB

Backend server for envd

License: Mozilla Public License 2.0

Dockerfile 0.08% Makefile 2.19% Go 54.43% Smarty 0.54% JavaScript 0.13% HTML 0.10% Vue 35.81% CSS 0.02% TypeScript 6.19% HCL 0.50%
hacktoberfest kubernetes

envd-server's Introduction

envd-server

envd-server is the backend server for envd, which talks to Kubernetes and manages environments for users.

Install

helm install --debug envd-server ./manifests
# skip 8080 if you're going to run the envd-server locally
kubectl --namespace default port-forward service/envd-server 8080:8080 &
kubectl --namespace default port-forward service/envd-server 2222:2222 &

To run the envd-server locally:

make build-local
./bin/envd-server --kubeconfig $HOME/.kube/config --hostkey manifests/secretkeys/hostkey

Usage

envd context create --name server --runner envd-server --runner-address http://localhost:8080 --use
envd login
envd create --image gaocegege/test-envd

Development Guide of Dashboard

Build

Enter into ./dashboard directory to develop just like normal vue application.

If you want to build envd-server with dashboard

pushd dashboard
npm install
npm run build
popd
 DASHBOARD_BUILD=release make build-local

When envd-server is running, you can visit http://localhost:8080/dashboard to see it.

Develop locally

  • Port forward the postgresql service to local
kubectl port-forward svc/postgres-service 5432:5432
  • Setup environment variable
export KUBECONFIG=~/.kube/config
export ENVD_DB_URL=postgres://postgresadmin:admin12345@localhost:5432/postgresdb?sslmode=disable
  • Run envd-server locally
./bin/envd-server --debug --no-auth # Remove no-auth if auth is needed

envd-server's People

Contributors

alexxi19 avatar arugal avatar aseaday avatar dependabot[bot] avatar enjoyliu avatar gaocegege avatar hezhizhen avatar kemingy avatar muniu-bot[bot] avatar vovallen avatar weixiao-huang avatar zwpaper avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

envd-server's Issues

feat(server): Avoid creating user service per request

Description

Now user.Service is created on demand, which is not necessary. We can keep a user.Service in server.

// @Summary     register the user.
// @Description register the user for the given public key.
// @Tags        user
// @Accept      json
// @Produce     json
// @Param       request body     types.AuthNRequest true "query params"
// @Success     200     {object} types.AuthNResponse
// @Router      /register [post]
func (s *Server) register(c *gin.Context) {
	var req types.AuthNRequest
	if err := c.BindJSON(&req); err != nil {
		logrus.Debug("failed to bind json", err)
		c.JSON(500, err)
		return
	}

	key, _, _, _, err := ssh.ParseAuthorizedKey([]byte(req.PublicKey))
	if err != nil {
		logrus.Debug("failed to parse auth key", err)
		c.JSON(500, err)
		return
	}
	userService := user.NewService(s.Queries, s.JWTSecret)
	token, err := userService.Register(req.LoginName, req.Password, key.Marshal())
	if err != nil {
		logrus.Warnf("register error: %+v", err)
		c.JSON(500, err)
		return
	}
	res := types.AuthNResponse{
		LoginName:     req.LoginName,
		IdentityToken: token,
		Status:        "login succeeded",
	}
	c.JSON(200, res)
}

Message from the maintainers:

Love this enhancement proposal? Give it a ๐Ÿ‘. We prioritise the proposals with the most ๐Ÿ‘.

bug: `envd run` without login got an SQL error: "image_info" doesn't exist

Description

client error:

error: {"http_status_code":500,"message":"g.GetImage: g.querier.GetImageByDigest: ERROR: relation \"image_info\" does not exist (SQLSTATE 42P01)","request":"POST /api/v1/users/keming-fedora/environments","op":"image-service.create-image","error":{}}

server error:

time="2023-01-30T02:21:01Z" level=debug msg="error: image-service.create-image: g.GetImage: g.querier.GetImageByDigest: ERROR: relation \"image_info\" does not exist (SQLSTATE 42P01)"
time="2023-01-30T02:21:01Z" level=error msg="127.0.0.1 - envd-server-57f645d7c8-wb85b [30/Jan/2023:02:21:01 +0000] \"POST /api/v1/users/fedora/environments\" 500 242 \"\" \"Go-http-client/1.1\" (8056ms)" clientIP=127.0.0.1 dataLength=242 hostname=envd-server-57f645d7c8-wb85b latency=8056 method=POST path=/api/v1/users/fedora/environments referer= statusCode=500 userAgent=Go-http-client/1.1

Reproduction

Additional Info


Message from the maintainers:

Impacted by this bug? Give it a ๐Ÿ‘. We prioritise the issues with the most ๐Ÿ‘.

feat(client): Report helpful error message to users in envd server and the client

Description

(base) โžœ  envd git:(auth) โœ— ./bin/envd login
WARN[2022-12-05T20:17:26+08:00] The password is nil, skip the authentication. Please make sure that the server is running in no-auth mode 
WARN[2022-12-05T20:17:26+08:00] The login name is nil, use the random-generated ID a332139d39b89a241400013700e665a3 as the login name 
error: {"Severity":"ERROR","Code":"23505","Message":"duplicate key value violates unique constraint \"unique_login_name\"","Detail":"Key (login_name)=(a332139d39b89a241400013700e665a3) already exists.","Hint":"","Position":0,"InternalPosition":0,"InternalQuery":"","Where":"","SchemaName":"public","TableName":"users","ColumnName":"","DataTypeName":"","ConstraintName":"unique_login_name","File":"nbtinsert.c","Line":664,"Routine":"_bt_check_unique"}

Now the error message is not human readable.


Message from the maintainers:

Love this enhancement proposal? Give it a ๐Ÿ‘. We prioritise the proposals with the most ๐Ÿ‘.

feat: support resource controll

Description

For the environments in the cluster, we should provide a function to setup the resource:

  • CPU
  • Memory
  • GPU

Message from the maintainers:

Love this enhancement proposal? Give it a ๐Ÿ‘. We prioritise the proposals with the most ๐Ÿ‘.

bug(pod): Failed to run sshd and jupyter in the pod

Description

cat /var/log/horust/jupyter_stderr.log
jupyter: child_process_main: Failed to exec the new process.
Errno: (2) No such file or directory
jupyter: child_process_main: Failed to exec the new process.
Errno: (2) No such file or directory
jupyter: child_process_main: Failed to exec the new process.
Errno: (2) No such file or directory
jupyter: child_process_main: Failed to exec the new process.
Errno: (2) No such file or directory
jupyter: child_process_main: Failed to exec the new process.
Errno: (2) No such file or directory
jupyter: child_process_main: Failed to exec the new process.
Errno: (2) No such file or directory

Reproduction

Additional Info


Message from the maintainers:

Impacted by this bug? Give it a ๐Ÿ‘. We prioritise the issues with the most ๐Ÿ‘.

feat(environment): Support webhook in environment creation

Description

As the ops engineer, I want to inject some configs into the environment (pod spec). Thus it will be better for me to configure a webhook server to update the config during runtime.


Message from the maintainers:

Love this enhancement proposal? Give it a ๐Ÿ‘. We prioritise the proposals with the most ๐Ÿ‘.

bug: Fail to create the environment without resource request

Description

envd run --image xxx
error: {"ErrStatus":{"metadata":{},"status":"Failure","message":"Pod \"fisherwool\" is invalid: spec.containers[0].resources.limits: Required value: Limit must be set for non overcommitable resources","reason":"Invalid","details":{"name":"fisherwool","kind":"Pod","causes":[{"reason":"FieldValueRequired","message":"Required value: Limit must be set for non overcommitable resources","field":"spec.containers[0].resources.limits"}]},"code":422}}

Reproduction

Additional Info


Message from the maintainers:

Impacted by this bug? Give it a ๐Ÿ‘. We prioritise the issues with the most ๐Ÿ‘.

feat(deploy): Use deployment and nodeport to deploy envd-server

Description

We should use deployment (not pod) to deploy envd-server. And expose the service with node port for development purposes.


Message from the maintainers:

Love this enhancement proposal? Give it a ๐Ÿ‘. We prioritise the proposals with the most ๐Ÿ‘.

feat: Add more info to image and envs

Description


Message from the maintainers:

Love this enhancement proposal? Give it a ๐Ÿ‘. We prioritise the proposals with the most ๐Ÿ‘.

feat(api): Refactor environments API

Description

Use /users/<>/environments post to create the environment.


Message from the maintainers:

Love this enhancement proposal? Give it a ๐Ÿ‘. We prioritise the proposals with the most ๐Ÿ‘.

feat: db migration support

Description

Support db migration tools


Message from the maintainers:

Love this enhancement proposal? Give it a ๐Ÿ‘. We prioritise the proposals with the most ๐Ÿ‘.

feat(deploy): Make manifests a helm chart

Description

Let's use helm chart, instead of raw k8s yaml file.


Message from the maintainers:

Love this enhancement proposal? Give it a ๐Ÿ‘. We prioritise the proposals with the most ๐Ÿ‘.

chore: e2e tutorial (with UI)

Description


Message from the maintainers:

Love this enhancement proposal? Give it a ๐Ÿ‘. We prioritise the proposals with the most ๐Ÿ‘.

feat: add tests for envd-server

Description


Message from the maintainers:

Love this enhancement proposal? Give it a ๐Ÿ‘. We prioritise the proposals with the most ๐Ÿ‘.

bug: Image get endpoint doesn't work when image name contains `/`

Description

We used authorized.GET("/:login_name/images/:name", WrapHandler(s.imageGet)) to register the imageGet handler. However, it's common for image name to be nvidia/cuda, which cannot be properly matched with /:name.

Note other restful API may also have similar problems, such as special characters in environment name or username.

cc @gaocegege

Reproduction

Additional Info


Message from the maintainers:

Impacted by this bug? Give it a ๐Ÿ‘. We prioritise the issues with the most ๐Ÿ‘.

refact: align the docker label prefix with kubernetes annotations

Description

Currently, we have two types of labels:

  • ai.tensorchord.envd.*
  • envd.tensorchord.ai/*

Check

EnvdLabelPrefix = "envd.tensorchord.ai/"
LabelUID = EnvdLabelPrefix + "uid"
LabelEnvironmentName = EnvdLabelPrefix + "environment-name"
ImageLabelContainerName = "ai.tensorchord.envd.container.name"
ImageLabelPorts = "ai.tensorchord.envd.ports"
ImageLabelRepo = "ai.tensorchord.envd.repo"
ImageLabelJupyterAddr = "ai.tensorchord.envd.jupyter.address"
ImageLabelRStudioServerAddr = "ai.tensorchord.envd.rstudio.server.address"

Ref:


Message from the maintainers:

Love this enhancement proposal? Give it a ๐Ÿ‘. We prioritise the proposals with the most ๐Ÿ‘.

feat: user auth mechanism design

Description


Message from the maintainers:

Love this enhancement proposal? Give it a ๐Ÿ‘. We prioritise the proposals with the most ๐Ÿ‘.

feat(dashboard): Support image list

Description

There is an endpoint /users/<>/images in envd-server, we should support it in dashboard.


Message from the maintainers:

Love this enhancement proposal? Give it a ๐Ÿ‘. We prioritise the proposals with the most ๐Ÿ‘.

bug: fix muniu bot merge type

Description

I disabled the merge commits strategy. squash merge should be preferred

Reproduction

Additional Info


Message from the maintainers:

Impacted by this bug? Give it a ๐Ÿ‘. We prioritise the issues with the most ๐Ÿ‘.

Failed to start postgres pod

Description

postgres-deployment-6c78787cf7-h65pg   0/1     Error                   1 (2s ago)   12s
syncresources-b97cb6756-trt7v          1/1     Running                 0            21d
(flytekit-3.10) โžœ  envd-server git:(main) k logs postgres-deployment-6c78787cf7-h65pg
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

The database cluster will be initialized with locale "en_US.utf8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".

Data page checksums are disabled.

initdb: directory "/var/lib/postgresql/data" exists but is not empty
It contains a lost+found directory, perhaps due to it being a mount point.
Using a mount point directly as the data directory is not recommended.
Create a subdirectory under the mount point.

Reproduction

helm install envd-server ./manifests

Additional Info


Message from the maintainers:

Impacted by this bug? Give it a ๐Ÿ‘. We prioritise the issues with the most ๐Ÿ‘.

bug(image): Failed to access to docker hub in the pod

Description

time="2022-10-24T09:08:43Z" level=debug msg="Trying to access \"docker.io/gaocegege/test-envd:latest\""
time="2022-10-24T09:08:43Z" level=debug msg="No credentials matching docker.io/gaocegege/test-envd found in /run/containers/0/auth.json"
time="2022-10-24T09:08:43Z" level=debug msg="No credentials matching docker.io/gaocegege/test-envd found in /root/.config/containers/auth.json"
time="2022-10-24T09:08:43Z" level=debug msg="No credentials matching docker.io/gaocegege/test-envd found in /root/.docker/config.json"
time="2022-10-24T09:08:43Z" level=debug msg="No credentials matching docker.io/gaocegege/test-envd found in /root/.dockercfg"
time="2022-10-24T09:08:43Z" level=debug msg="No credentials for docker.io/gaocegege/test-envd found"
time="2022-10-24T09:08:43Z" level=debug msg=" No signature storage configuration found for docker.io/gaocegege/test-envd:latest, using built-in default file:///var/lib/containers/sigstore"
time="2022-10-24T09:08:43Z" level=debug msg="Looking for TLS certificates and private keys in /etc/docker/certs.d/docker.io"
time="2022-10-24T09:08:43Z" level=debug msg="GET https://registry-1.docker.io/v2/"
time="2022-10-24T09:08:44Z" level=debug msg="Ping https://registry-1.docker.io/v2/ err Get \"https://registry-1.docker.io/v2/\": x509: certificate signed by unknown authority (&url.Error{Op:\"Get\", URL:\"https://registry-1.docker.io/v2/\", Err:x509.UnknownAuthorityError{Cert:(*x509.Certificate)(0xc000534100), hintErr:error(nil), hintCert:(*x509.Certificate)(nil)}})"
time="2022-10-24T09:08:44Z" level=debug msg="GET https://registry-1.docker.io/v1/_ping"
time="2022-10-24T09:08:44Z" level=debug msg="Ping https://registry-1.docker.io/v1/_ping err Get \"https://registry-1.docker.io/v1/_ping\": x509: certificate signed by unknown authority (&url.Error{Op:\"Get\", URL:\"https://registry-1.docker.io/v1/_ping\", Err:x509.UnknownAuthorityError{Cert:(*x509.Certificate)(0xc0007eb600), hintErr:error(nil), hintCert:(*x509.Certificate)(nil)}})"
time="2022-10-24T09:08:44Z" level=debug msg="Accessing \"docker.io/gaocegege/test-envd:latest\" failed: pinging container registry registry-1.docker.io: Get \"https://registry-1.docker.io/v2/\": x509: certificate signed by unknown authority"
time="2022-10-24T09:08:44Z" level=error msg="127.0.0.1 - envd-server-58748d9f4d-vdlxs [24/Oct/2022:09:08:44 +0000] \"POST /v1/users/a332139d39b89a241400013700e665a3/environments\" 500 2 \"\" \"Go-http-client/1.1\" (873ms)" clientIP=127.0.0.1 dataLength=2 hostname=envd-server-58748d9f4d-vdlxs latency=873 method=POST path=/v1/users/a332139d39b89a241400013700e665a3/environments referer= statusCode=500 userAgent=Go-http-client/1.1

Reproduction

Additional Info


Message from the maintainers:

Impacted by this bug? Give it a ๐Ÿ‘. We prioritise the issues with the most ๐Ÿ‘.

Envd server timing out when not logged in

The behavior when not logged in (envd run without envd login) is a bit confusing, ssh'ing into the container times out both on the run command or manually ssh'ing into the container.

image

Screen Shot 2023-01-06 at 12 12 18 AM

Maybe related to #160

feat: support demo server

  • image size (need to develop [optional])
  • number of environments (need to develop the global limit)
  • CPU/GPU/Memory for each environment (need to develop the global maximum limit)
  • destroy all the environment every midnight (maybe a cron job)
  • collect idle environment aggressively (need to develop)
  • related to tensorchord/envd#1309

Originally posted by @kemingy in #46 (comment)

feat: Change JWT signing algorithm from HS256 to RS256

Description

  • HS256 is a symmetric algorithm that shares one secret key between the identity provider and your application. The same key is used to sign a JWT and allow verification that signature.

  • RS256 algorithm is an asymmetric algorithm that uses a private key to sign a JWT and a public key to verification that signature.

  • RS256 is the recommended algorithm when signing your JWTs. It is more secure, and you can rotate keys quickly if they are compromised. (Auth0 signs JWTs with RS256 by default).


Message from the maintainers:

Love this enhancement proposal? Give it a ๐Ÿ‘. We prioritise the proposals with the most ๐Ÿ‘.

feat(env): Support webhook to update the pod spec

Description

Users may need to update the pod spec. For example, add a volume. We should provide a webhook to achieve it.


Message from the maintainers:

Love this enhancement proposal? Give it a ๐Ÿ‘. We prioritise the proposals with the most ๐Ÿ‘.

bug: 'error: 404 page not found' when executing envd login

Description

I got 'error: 404 page not found' when following the guide envd on Kubernetes (Experimental).

Reproduction

git clone https://github.com/tensorchord/envd-server
cd ./envd-server
helm install envd-server ./manifests

kubectl --namespace default port-forward svc/envd-server 8080:8080 2222:2222

then open another terminal:

envd context create --name envd-server --use --builder docker-container --runner envd-server --runner-address localhost:2222

envd login --username yobol --password yobol
# got 'error: 404 page not found'

logs as following:

$ kubectl logs -f envd-server-596c5b7878-g8zd9 -c envd-server                                    
W1213 11:36:12.846589       1 client_config.go:617] Neither --kubeconfig nor --master was specified.  Using the inClusterConfig.  This might not work.
[GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production.
 - using env:	export GIN_MODE=release
 - using code:	gin.SetMode(gin.ReleaseMode)

[GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production.
 - using env:	export GIN_MODE=release
 - using code:	gin.SetMode(gin.ReleaseMode)

time="2022-12-13T11:36:12Z" level=debug msg="load host key from /etc/containerssh/hostkey"
[GIN-debug] GET    /swagger/*any             --> github.com/swaggo/gin-swagger.CustomWrapHandler.func1 (3 handlers)
[GIN-debug] POST   /v1/users/:identity_token/environments --> github.com/tensorchord/envd-server/pkg/server.(*Server).environmentCreate-fm (4 handlers)
[GIN-debug] GET    /v1/users/:identity_token/environments --> github.com/tensorchord/envd-server/pkg/server.(*Server).environmentList-fm (4 handlers)
[GIN-debug] GET    /v1/users/:identity_token/environments/:name --> github.com/tensorchord/envd-server/pkg/server.(*Server).environmentGet-fm (4 handlers)
[GIN-debug] DELETE /v1/users/:identity_token/environments/:name --> github.com/tensorchord/envd-server/pkg/server.(*Server).environmentRemove-fm (4 handlers)
[GIN-debug] GET    /v1/users/:identity_token/images/:name --> github.com/tensorchord/envd-server/pkg/server.(*Server).imageGet-fm (4 handlers)
[GIN-debug] GET    /v1/users/:identity_token/images --> github.com/tensorchord/envd-server/pkg/server.(*Server).imageList-fm (4 handlers)
[GIN-debug] GET    /v1/                      --> github.com/tensorchord/envd-server/pkg/server.(*Server).handlePing-fm (3 handlers)
[GIN-debug] POST   /v1/auth                  --> github.com/tensorchord/envd-server/pkg/server.(*Server).auth-fm (3 handlers)
[GIN-debug] POST   /v1/config                --> github.com/tensorchord/envd-server/pkg/server.(*Server).OnConfig-fm (3 handlers)
[GIN-debug] POST   /v1/pubkey                --> github.com/tensorchord/envd-server/pkg/server.(*Server).OnPubKey-fm (3 handlers)
[GIN-debug] [WARNING] You trusted all proxies, this is NOT safe. We recommend you to set a value.
Please check https://pkg.go.dev/github.com/gin-gonic/gin#readme-don-t-trust-all-proxies for details.
[GIN-debug] Environment variable PORT is undefined. Using port :8080 by default
[GIN-debug] Listening and serving HTTP on :8080
time="2022-12-13T11:41:03Z" level=warning msg="127.0.0.1 - envd-server-596c5b7878-g8zd9 [13/Dec/2022:11:41:03 +0000] \"POST /api/v1/login\" 404 0 \"\" \"Go-http-client/1.1\" (1ms)" clientIP=127.0.0.1 dataLength=0 hostname=envd-server-596c5b7878-g8zd9 latency=1 method=POST path=/api/v1/login referer= statusCode=404 userAgent=Go-http-client/1.1

Additional Info

envd: v0.2.5
BuildDate: 2022-12-07T03:14:47Z
GitCommit: 235dde905643e2eed7ba91e10423b92598d6a12a
GitTreeState: clean
GitTag: v0.2.5
GoVersion: go1.18.8
Compiler: gc
Platform: linux/amd64


Message from the maintainers:

Impacted by this bug? Give it a ๐Ÿ‘. We prioritise the issues with the most ๐Ÿ‘.

Error when creating the same environment with two accounts

Error when creating the same environment with two accounts.

Recreating

envd login
envd --debug run --image alexxi19/simple-python-with-jupyter (ok)
envd login --username alex --password pw
envd --debug run --image alexxi19/simple-python-with-jupyter (error)

Error msg

DEBU[2023-01-07T15:12:39-08:00] Creating envd server client                   jwt-key=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImFsZXgiLCJleHAiOjE2NzIwNDI4NTJ9._5CzUIdutRMgAwkvUA_0n34CPzfPAPJsVLtG0im24JA login-name=alex runner=envd-server
error: failed to create the environment: Error response from daemon: {"http_status_code":500,"message":"g.createImage: ERROR: duplicate key value violates unique constraint \"unique_digest\" (SQLSTATE 23505)","request":"POST /api/v1/users/alex/environments","op":"image-service.create-image","error":{}}
(1) attached stack trace
  -- stack trace:
  | github.com/tensorchord/envd/pkg/envd.(*envdServerEngine).StartEnvd
  |     github.com/tensorchord/envd/pkg/envd/envdserver.go:270
  | github.com/tensorchord/envd/pkg/app.run
  |     github.com/tensorchord/envd/pkg/app/run.go:131
  | github.com/urfave/cli/v2.(*Command).Run
  |     github.com/urfave/cli/[email protected]/command.go:271
  | github.com/urfave/cli/v2.(*Command).Run
  |     github.com/urfave/cli/[email protected]/command.go:264
  | github.com/urfave/cli/v2.(*App).RunContext
  |     github.com/urfave/cli/[email protected]/app.go:333
  | github.com/urfave/cli/v2.(*App).Run
  |     github.com/urfave/cli/[email protected]/app.go:310
  | main.run
  |     github.com/tensorchord/envd/cmd/envd/main.go:39
  | main.main
  |     github.com/tensorchord/envd/cmd/envd/main.go:67
  | runtime.main
  |     runtime/proc.go:250
Wraps: (2) failed to create the environment
Wraps: (3)
Wraps: (4) attached stack trace
  -- stack trace:
  | github.com/tensorchord/envd-server/client.(*Client).checkResponseErr
  |     github.com/tensorchord/[email protected]/client/request.go:220
  | [...repeated from below...]
Wraps: (5) Error response from daemon
Wraps: (6) attached stack trace
  -- stack trace:
  | github.com/tensorchord/envd-server/client.(*Client).checkResponseErr
  |     github.com/tensorchord/[email protected]/client/request.go:220
  | github.com/tensorchord/envd-server/client.(*Client).sendRequest
  |     github.com/tensorchord/[email protected]/client/request.go:131
  | github.com/tensorchord/envd-server/client.(*Client).post
  |     github.com/tensorchord/[email protected]/client/request.go:48
  | github.com/tensorchord/envd-server/client.(*Client).EnvironmentCreate
  |     github.com/tensorchord/[email protected]/client/environment_create.go:28
  | github.com/tensorchord/envd/pkg/envd.(*envdServerEngine).StartEnvd
  |     github.com/tensorchord/envd/pkg/envd/envdserver.go:268
  | github.com/tensorchord/envd/pkg/app.run
  |     github.com/tensorchord/envd/pkg/app/run.go:131
  | github.com/urfave/cli/v2.(*Command).Run
  |     github.com/urfave/cli/[email protected]/command.go:271
  | github.com/urfave/cli/v2.(*Command).Run
  |     github.com/urfave/cli/[email protected]/command.go:264
  | github.com/urfave/cli/v2.(*App).RunContext
  |     github.com/urfave/cli/[email protected]/app.go:333
  | github.com/urfave/cli/v2.(*App).Run
  |     github.com/urfave/cli/[email protected]/app.go:310
  | main.run
  |     github.com/tensorchord/envd/cmd/envd/main.go:39
  | main.main
  |     github.com/tensorchord/envd/cmd/envd/main.go:67
  | runtime.main
  |     runtime/proc.go:250
  | runtime.goexit
  |     runtime/asm_arm64.s:1172
Wraps: (7) {"http_status_code":500,"message":"g.createImage: ERROR: duplicate key value violates unique constraint \"unique_digest\" (SQLSTATE 23505)","request":"POST /api/v1/users/alex/environments","op":"image-service.create-image","error":{}}
Error types: (1) *withstack.withStack (2) *errutil.withPrefix (3) errdefs.errSystem (4) *withstack.withStack (5) *errutil.withPrefix (6) *withstack.withStack (7) *errutil.leafError
error: {"http_status_code":500,"message":"g.createImage: ERROR: duplicate key value violates unique constraint \"unique_digest\" (SQLSTATE 23505)","request":"POST /api/v1/users/alex/environments","op":"image-service.create-image","error":{}}

feat: envd login without auth should have better UX

Description

Some thoughts:

  • anonymous login should be explicit like envd login --anonymous or something else
  • more guide on "how to log in the dashboard with anonymous users"

Message from the maintainers:

Love this enhancement proposal? Give it a ๐Ÿ‘. We prioritise the proposals with the most ๐Ÿ‘.

bug(server): Duplicate images in DB when calling `/images` list

Description

(base) โžœ  envd git:(166978c) โœ— ./bin/envd image ls                           
NAME                                    CONTEXT                                                                         GPU     CUDA    CUDNN   IMAGE ID        CREATED         SIZE  
gaocegege/test-envd:user-envd-config    /home/gaocegege/code/go/src/github.com/tensorchord/envd/examples/python-basic   false   <none>  <none>  d7d1918bc6b6    4 weeks ago     357MB
gaocegege/test-envd:user-envd-config    /home/gaocegege/code/go/src/github.com/tensorchord/envd/examples/python-basic   false   <none>  <none>  d7d1918bc6b6    4 weeks ago     357MB
gaocegege/test-envd:user-envd-config    /home/gaocegege/code/go/src/github.com/tensorchord/envd/examples/python-basic   false   <none>  <none>  d7d1918bc6b6    4 weeks ago     357MB
gaocegege/test-envd:user-envd-config    /home/gaocegege/code/go/src/github.com/tensorchord/envd/examples/python-basic   false   <none>  <none>  d7d1918bc6b6    4 weeks ago     357MB

All these 4 images are the same.

Reproduction

Additional Info


Message from the maintainers:

Impacted by this bug? Give it a ๐Ÿ‘. We prioritise the issues with the most ๐Ÿ‘.

bug: server won't return anything when `envd run` without `envd login`

Description

It will hang there without returning anything. Force exit won't get any error messages.

In no-auth mode, the server will still create the env.

Reproduction

Additional Info


Message from the maintainers:

Impacted by this bug? Give it a ๐Ÿ‘. We prioritise the issues with the most ๐Ÿ‘.

feat(register): How to register the public key

Description

If we register the user from the web dashboard, then how to provide the ssh public key


Message from the maintainers:

Love this enhancement proposal? Give it a ๐Ÿ‘. We prioritise the proposals with the most ๐Ÿ‘.

feat: Support sync code with local folders

Description

Currently, envd-server will clone the repo from the info of image label. We should also support sync with user's local folder

Current logic at https://github.com/tensorchord/envd-server/blob/main/pkg/server/environment_create.go#L175-L201

Reference:


Message from the maintainers:

Love this enhancement proposal? Give it a ๐Ÿ‘. We prioritise the proposals with the most ๐Ÿ‘.

bug(CLI): Failed to list old environments with the latest envd

Description

The old label looks like:

                "ai.tensorchord.envd.pypi.commands": "[\"torch\",\"torchvision\",\"--extra-index-url https://download.pytorch.org/whl/cu113\"]",

It does not works with the latest envd since we use [[], []] now.

Reproduction

Additional Info


Message from the maintainers:

Impacted by this bug? Give it a ๐Ÿ‘. We prioritise the issues with the most ๐Ÿ‘.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.