Skip to content
This repository has been archived by the owner on Feb 15, 2025. It is now read-only.

make build-gpu fails on WSL2 without Docker Desktop #844

Closed
unicorn-kp opened this issue Jul 27, 2024 · 1 comment
Closed

make build-gpu fails on WSL2 without Docker Desktop #844

unicorn-kp opened this issue Jul 27, 2024 · 1 comment
Labels
possible-bug 🐛 Something may not be working

Comments

@unicorn-kp
Copy link
Contributor

unicorn-kp commented Jul 27, 2024

See linked branch for updates to Dockerfiles

Environment

Host Device and OS:

  • OS: Windows 11 22631.3880
  • CPU: Intel(R) Core(TM) i9-14900HX 2.20 GHz
  • GPU: NVIDIA 4090 Laptop 16 GB VRAM
  • Memory: 64 GB

WSL2:

  • WSL version: 2.2.4.0
  • Kernel version: 5.15.153.1-2
  • WSLg version: 1.0.61
  • MSRDC version: 1.2.5326
  • Direct3D version: 1.611.1-81528511
  • DXCore version: 10.0.26091.1-240325-1447.ge-release
  • Windows version: 10.0.22631.3880
  • OS: Ubuntu 22.04.04 LTS

App/package versions:

  • uds v0.13.1
  • Docker version 27.1.1, build 6312585

Kubernetes distro being used:

  • k3d version v5.7.1
  • k3s version v1.29.6-k3s1

Other:

  • off branch main

Steps to reproduce

git clone git@github.com:defenseunicorns/leapfrogai.git
cd leapfrogai
make build-k3d-gpu
make create-uds-gpu-cluster
make build-gpu LOCAL_VERSION=dev

Expected result

Should build all the packages in the makefile for GPU

Actual Result

  • Results in errors based on makefiles

Visual Proof (screenshots, videos, text, etc)

(base) unicorn_kp@MSI:~/tmp/leapfrogai$ make build-gpu LOCAL_VERSION=dev
Creating local Docker registry...
Unable to find image 'registry:2' locally
2: Pulling from library/registry
930bdd4d222e: Pull complete
a15309931e05: Pull complete
6263fb9c821f: Pull complete
86c1d3af3872: Pull complete
a37b1bf6a96f: Pull complete
Digest: sha256:12120425f07de11a1b899e418d4b0ea174c8d4d572d45bdb640f93bc7ca06a3d
Status: Downloaded newer image for registry:2
ea920e4af2f4ae20bd60ed9407334581e9affed958f3a781b1cba06042a0aea8
Local registry created at localhost:5000
## Build the migration container for this version of the supabase package
docker build -t ghcr.io/defenseunicorns/leapfrogai/supabase-migrations:dev -f Dockerfile.migrations --build-arg="MIGRATIONS_DIR=packages/supabase/migrations" .
failed to fetch metadata: fork/exec /usr/local/lib/docker/cli-plugins/docker-buildx: no such file or directory

DEPRECATED: The legacy builder is deprecated and will be removed in a future release.
            Install the buildx component to build images with BuildKit:
            https://docs.docker.com/go/buildx/

Sending build context to Docker daemon  58.56MB
Step 1/9 : FROM --platform=$TARGETPLATFORM cgr.dev/chainguard/bash:latest
failed to parse platform : "" is an invalid OS component of "": OSAndVersion specifier component must match "^([A-Za-z0-9_-]+)(?:\\(([A-Za-z0-9_.-]*)\\))?$": invalid argument
make: *** [Makefile:53: docker-supabase] Error 1

Update Dockerfile.migrations to hardcode TARGETPLATFORM

# FROM --platform=$TARGETPLATFORM cgr.dev/chainguard/bash:latest
FROM cgr.dev/chainguard/bash:latest
ARG TARGETPLATFORM
ENV TARGETPLATFORM=${TARGETPLATFORM:-linux/amd64}

Execute make build-gpu LOCAL_VERSION=dev

Step 26/86 : COPY --from=sdk --chown=nonroot:nonroot /leapfrogai/${SDK_DEST} ./${SDK_DEST}
unable to convert uid/gid chown string to host mapping: can't find gid for group nonroot: no such group: nonroot
make: *** [Makefile:110: docker-vllm] Error 1

Modify packages/vllm/dockerfile to remove all instances of nonroot and use USER 65532 instead.

Execute make build-gpu LOCAL_VERSION=dev

Get an error about trying to copy into multiple files/directories in packages/whisper/Dockerfile.

Modify COPY --from=ffmpeg /usr/lib/lib* /usr/lib to COPY --from=ffmpeg /usr/lib/lib* /usr/lib/

Build then works.

Severity/Priority

Low/Low

Additional Context

WSL2 has been successfully tested by @gphorvath. The only difference we can tell so far is that he is using Docker Desktop and I am not. I only have docker engine.

Docker buildx is installed in WSL2 too.

@unicorn-kp unicorn-kp added the possible-bug 🐛 Something may not be working label Jul 27, 2024
@unicorn-kp
Copy link
Contributor Author

Closed with #807

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
possible-bug 🐛 Something may not be working
Projects
None yet
Development

No branches or pull requests

1 participant