-
Notifications
You must be signed in to change notification settings - Fork 380
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 for CPU and GPU #22
Comments
Example of session with GPU Using the GPU the performances will speed up of 3x at least during the generation. Please run with
|
Thanks! I found this very helpful. Hope the Docker file can get merged? Looking like for current code to work, it needs a very specific TF version... Oh such a perfect day. 0.741055 |
I did noticed that calls to |
@moscow25 I will send a PR! |
@loretoparisi Thanks a tonne. Very Helpful ..!! |
@loretoparisi Thanks a bunch! |
You're welcome! |
I have here added a Docker file for both CPU and GPU builds.
How To Build the Docker image
To build the Docker image for CPU only
or execute
./build.sh
while to build the Docker image for GPU
or you execute
./build.sh GPU
How To Run the Docker image
To run for CPU
or execute
./run.sh
while to run for GPU you have to attach the nvidia-docker driver and device (here we attach the device 0, that is the first GPU as default):
or execute
./run.sh GPU
How To Use it
As soon as you run the image you will be in the
/sentiment
folder.Then you can run the provided examples
test_sentiment.py
:and the
test_generative.py
example, adapted from this fork.Notes
generate_sequence
method.nvidia-docker
installed. To check the nvidia toolkit installation please run thenvidia-smi
command to list the available connected gpu.tensorflow
latest python3 docker image -tensorflow:latest-py3
andtensorflow:latest-gpu-py3
for the gpu.tqdm
module via pip in the Dockerfile.If there will be further info how to train this model, I will add to the Docker image.
The text was updated successfully, but these errors were encountered: