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

Dockerfile #3

Open
vishnubob opened this issue Jun 18, 2020 · 7 comments
Open

Dockerfile #3

vishnubob opened this issue Jun 18, 2020 · 7 comments

Comments

@vishnubob
Copy link

vishnubob commented Jun 18, 2020

Thanks for publishing this work. Here is a Dockerfile that builds a compatible runtime environment for executing this model.

FROM nvidia/cuda:10.0-cudnn7-runtime-ubuntu18.04
RUN apt-get update && \
    apt-get install -y python3-pip && \
    pip3 install \
    numpy==1.16.3 \
    tensorflow-gpu==1.13.1 \
    imageio==2.8.0 \
    fire>=0.1.3 \
    regex==2017.4.5 \
    requests==2.21.0 \
    tqdm==4.31.1 \
    scipy==1.4.1

Clone this repo, and drop this Dockerfile in the root of the repo. Build the container:

docker build -t image-gpt .

With the root of repo as your current directory, run the container:

docker run -it -v $(pwd):/app -v $HOME/image-gpt-data:/root image-gpt bash

@asisakov
Copy link

Perhaps it will be better to use a lower amount of memory and initially set:
FROM python:3.6-stretch
Not Ubuntu.

Also, we can use:

COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

Instead of RUN ....

@vishnubob
Copy link
Author

Perhaps it will be better to use a lower amount of memory and initially set:
...
Also, we can use:
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

Thanks for your suggestions. Ubuntu or Debian aside, the image I picked includes the right CUDA and CUDNN versions necessary to run this work on a GPU. At the time I wrote and posted this Dockerfile, there were missing dependencies in the requirements.txt, so that's why they are hard coded. The intent was not to provide something canonical or ideal, it was to help people get started during this early phase of publishing. So, after testing this Dockerfile to make sure it works, here it is.

Can I ask, did you test your suggestions?

@asisakov
Copy link

includes the right CUDA and CUDNN versions necessary to run this work on a GPU

there were missing dependencies

Thank you for sharing. I didn't notice it at first.

I did test my code, but not the whole. When data started to download, in my thoughts, it worked well. But my mistake is that I didn't try to run the model. Maybe the process would show me the incomplete (in your words) requirements.
If you are interested in my code, you can check it in pull-requests.

@asisakov
Copy link

asisakov commented Jun 25, 2020

Can I add your part with Ubuntu to Dockerfile?

@vishnubob
Copy link
Author

Please, add away!

@zikkuratti
Copy link

zikkuratti commented Jul 3, 2020

I make DockerHub public repo cybersatori/image-gpt by Dockerfile upper, you can add it by docker search image-gpt command to your terminal, and run it by docker run -it cybersatori/image-gpt /bin/bash trying to test it by myself now

@yugo-harago
Copy link

I'm having this error:
"ImportError: libcuda.so.1: cannot open shared object file: No such file or directory"
When I run "python src/run.py --sample --n_embd 512 --n_head 8 --n_layer 24"

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

4 participants