Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail to install using docker #23

Open
hyfung opened this issue Jul 14, 2023 · 2 comments
Open

Fail to install using docker #23

hyfung opened this issue Jul 14, 2023 · 2 comments

Comments

@hyfung
Copy link

hyfung commented Jul 14, 2023

Environment: Ubuntu 20.04 with Go 1.20.6 from snap

Using docker with go install:

>     -v $(pwd):/dest \
>     golang:1.16.4 \
>     sh -c "
>     go install github.com/NVIDIA/mig-parted/cmd@latest
>     mv /go/bin/cmd /dest/nvidia-mig-parted
>     "

Unable to find image 'golang:1.16.4' locally
1.16.4: Pulling from library/golang
d960726af2be: Pull complete 
e8d62473a22d: Pull complete 
8962bc0fad55: Pull complete 
65d943ee54c1: Pull complete 
f2253e6fbefa: Pull complete 
6d7fa7c7d5d3: Pull complete 
e2e442f7f89f: Pull complete 
Digest: sha256:8a106c4b4005efb43c0ba4bb5763b84742c7e222bad5a8dff73cc9f7710c64ee
Status: Downloaded newer image for golang:1.16.4
go: downloading github.com/NVIDIA/mig-parted v0.5.3
go install github.com/NVIDIA/mig-parted/cmd@latest: module github.com/NVIDIA/mig-parted@latest found (v0.5.3), but does not contain package github.com/NVIDIA/mig-parted/cmd
mv: cannot stat '/go/bin/cmd': No such file or directory
@elezar
Copy link
Member

elezar commented Jul 14, 2023

Could you replace github.com/NVIDIA/mig-parted/cmd with github.com/NVIDIA/mig-parted/cmd/nvidia-mig-parted in the example above?

I think we failed to update all our documentation when cleaning up the repo to better allign with idiomatic go project structure.

@Eridoc
Copy link

Eridoc commented Mar 6, 2025

Faced the same issue even after replacing the path.

EDIT: Increasing the golang version to 1.23.5 (as in the latest release notes) fixes it:
golang:1.23.5

docker run \
>     --rm \
>     -v $(pwd):/dest \
>     golang:1.20.1 \
>     sh -c "
>     go install github.com/NVIDIA/mig-parted/cmd/nvidia-mig-parted@latest
>     mv /go/bin/nvidia-mig-parted /dest/nvidia-mig-parted
>     "
Unable to find image 'golang:1.20.1' locally
1.20.1: Pulling from golang
32fb02163b6b: Pull complete
167c7feebee8: Pull complete
d6dfff1f6f3d: Pull complete
e9cdcd4942eb: Pull complete
543368fb39ee: Pull complete
706589508377: Pull complete
a1071e22fca9: Pull complete
Digest: sha256:52921e63cc544c79c111db1d8461d8ab9070992d9c636e1573176642690c14b5
Status: Downloaded newer image for golang:1.20.1
go: downloading github.com/NVIDIA/mig-parted v0.11.0
go: github.com/NVIDIA/mig-parted/cmd/nvidia-mig-parted@latest (in github.com/NVIDIA/mig-parted@v0.11.0): go.mod:3: invalid go version '1.23.0': must match format 1.23
go.mod:5: unknown directive: toolchain
mv: cannot stat '/go/bin/nvidia-mig-parted': No such file or directory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants