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

Docker build issue #44

Open
nathangielis opened this issue Nov 30, 2021 · 3 comments
Open

Docker build issue #44

nathangielis opened this issue Nov 30, 2021 · 3 comments

Comments

@nathangielis
Copy link

I'm new to Docker and attempting to get started with Pixray. After following the install process I attempt to build a test from the doco: python pixray.py --drawer=pixel --prompt=sunrise but it dies with the following result:

docker: Error response from daemon: OCI runtime create failed: container_linux.go:380: starting container process caused: process_linux.go:545: container init caused: Running hook #0:: error running hook: exit status 1, stdout: , stderr: nvidia-container-cli: initialization error: driver error: failed to process request: unknown.
ⅹ exit status 125

The full output prior to that point is as follows:

`Building Docker image from environment in cog.yaml...
[+] Building 3.4s (17/17) FINISHED
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 1.56kB 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> resolve image config for docker.io/docker/dockerfile:1.2 2.2s
=> CACHED docker-image://docker.io/docker/dockerfile:1.2@sha256:e2a8561e419ab1ba6b2fe6cbdf49fd92b95912df1cf7d313c3e2230a333fdbcc 0.0s
=> [internal] load metadata for docker.io/nvidia/cuda:10.2-cudnn8-devel-ubuntu18.04 1.0s
=> [stage-0 1/9] FROM docker.io/nvidia/cuda:10.2-cudnn8-devel-ubuntu18.04@sha256:9843db9f92253080bcaad66e44cf8f5e9fbfef3291e10f854d5e226699c 0.0s
=> [internal] load build context 0.0s
=> => transferring context: 16.35kB 0.0s
=> CACHED [stage-0 2/9] RUN --mount=type=cache,target=/var/cache/apt apt-get update -qq && apt-get install -qqy --no-install-recommends mak 0.0s
=> CACHED [stage-0 3/9] RUN curl https://pyenv.run | bash && git clone https://github.com/momo-lab/pyenv-install-latest.git "$(pyenv root)" 0.0s
=> CACHED [stage-0 4/9] COPY .cog/tmp/build3151651485/cog-0.0.1.dev-py3-none-any.whl /tmp/cog-0.0.1.dev-py3-none-any.whl 0.0s
=> CACHED [stage-0 5/9] RUN --mount=type=cache,target=/root/.cache/pip pip install /tmp/cog-0.0.1.dev-py3-none-any.whl 0.0s
=> CACHED [stage-0 6/9] COPY requirements.txt /tmp/requirements.txt 0.0s
=> CACHED [stage-0 7/9] RUN --mount=type=cache,target=/root/.cache/pip pip install -r /tmp/requirements.txt && rm /tmp/requirements.txt 0.0s
=> CACHED [stage-0 8/9] RUN git clone https://github.com/pixray/diffvg && cd diffvg && git submodule update --init --recursive && CMAKE_PREF 0.0s
=> CACHED [stage-0 9/9] WORKDIR /src 0.0s
=> exporting to image 0.0s
=> => exporting layers 0.0s
=> => writing image sha256:156d43cb50d249ed8d3c542583f37c388f010cc1ef657ba6ca44325cea81ddc5 0.0s
=> => naming to docker.io/library/cog-pixray-base 0.0s
=> exporting cache 0.0s
=> => preparing build cache for export 0.0s

Running 'python pixray.py --drawer=pixel --prompt=sunrise' in Docker with the current directory mounted as a volume...`

It's been a bumpy ride getting everything set up, but this is one hurdle I can't solve - any ideas where the issue is so I know where to direct my attention?

@nathangielis
Copy link
Author

In the interests of helping out the community, I wanted to report back that I have finally got this working on a Mac (running Monterey).

The error reported above was due to the known limitations of Docker on Mac and the inability to access GPUs from inside Docker images. The build process however attempts to install the nvidia/CUDA kits, which is not going to work on a Mac.

Ultimately this issue was solved by editing cog.yaml as follows:

Line 2: set gpu to false (defaults as true)
Line 8: set DIFFVG_CUDA to -1 (default is 1)

If any other Mac users run into any issues I am happy to help where possible. As someone new to Docker it was a frustrating experience and if I can save someone else some time I will.

@Nosp1
Copy link

Nosp1 commented Dec 21, 2021

Thanks for the find @nathangielis, I had the same error on mac, but I thought the issue was related to not having a GPU so i went on my desktop with a 3080 ti - same error there. Might be correlated with me running WSL 2 for the windows issue.

@GilDev
Copy link

GilDev commented Feb 1, 2022

Thanks @nathangielis, that fixed it for me using WSL2.

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