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

Run in docker without GPU ? #101

Open
remygrandin opened this issue Jun 28, 2022 · 1 comment
Open

Run in docker without GPU ? #101

remygrandin opened this issue Jun 28, 2022 · 1 comment

Comments

@remygrandin
Copy link

Can I run the playground with docker without GPU ?

I know CPU only will be slow as heck but for testing I don't care if the pictures take very long to generate

I got this log when running :

Compiled successfully!
dalle-interface |
dalle-interface | You can now view dalle-playground in the browser.
dalle-interface |
dalle-interface |   Local:            http://localhost:3000/dalle-playground
dalle-interface |   On Your Network:  http://172.28.0.26:3000/dalle-playground
dalle-interface |
dalle-interface | Note that the development build is not optimized.
dalle-interface | To create a production build, use yarn build.
dalle-interface |
dalle-interface | webpack compiled successfully
18deb5a0b538_dalle-backend | --> Starting DALL-E Server. This might take up to two minutes.
18deb5a0b538_dalle-backend | 2022-06-28 11:48:50.864133: W external/org_tensorflow/tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcuda.so.1'; dlerror: libcuda.so.1: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/local/nvidia/lib:/usr/local/nvidia/lib64
18deb5a0b538_dalle-backend | 2022-06-28 11:48:50.864403: W external/org_tensorflow/tensorflow/stream_executor/cuda/cuda_driver.cc:269] failed call to cuInit: UNKNOWN ERROR (303)
18deb5a0b538_battleStation_dalle-backend | WARNING:absl:No GPU/TPU found, falling back to CPU. (Set TF_CPP_MIN_LOG_LEVEL=0 and rerun for more info.)

However when curling the backend (curl http://172.28.0.26:8080) I get a connection refused

Can it not be run as CPU only ? I didn't find anything in the doc indicating if it is possible or impossible

@NevesLucas
Copy link

NevesLucas commented Jul 8, 2022

it can, you need to change the jax library it uses to CPU,
in https://github.com/saharmor/dalle-playground/blob/main/backend/Dockerfile
need to change

# install jax[cuda]
RUN pip3 install --upgrade "jax[cuda]" -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html

to

# install jax[cpu]
RUN pip3 install --upgrade "jax[cpu]"

Might also want to change the FROM nvidia/cuda:11.4.3-cudnn8-devel-ubuntu20.04 to a standard ubuntu base image

(its insanely slow, just fyi)

then you can spin it up with the docker-compose.yml and the frontend should play nice

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

2 participants