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

Noob Question: How do I use this with my own files? #11

Open
grishmarao opened this issue Oct 23, 2017 · 6 comments
Open

Noob Question: How do I use this with my own files? #11

grishmarao opened this issue Oct 23, 2017 · 6 comments

Comments

@grishmarao
Copy link

Hi,
I'm using the Docker file and it works great with the example shakespeare text.
I'm trying to run:
docker run -it -v ~/data2:/data2 crisbal/torch-rnn:base bash
to mount my data folder and use it, but it doesn't show up. It works for other docker files, so are there any permissions I need to change? Or is there another way I can run it using my data?
I'm new to this and appreciate the help. Thank you

@crisbal
Copy link
Owner

crisbal commented Oct 23, 2017

Hello

Hmmm, that should work indeed.

Are you really sure the folder is not there? Can you please post the output of:

cd /
ls
cd data2

Also you probably want to mount it at /root/torch-rnn/data2 since that's the folder where the script is installed.

@grishmarao
Copy link
Author

Thank you! You're right, it was there - I was looking for it inside the torch-rnn folder.
I've changed to mount it there, works now. Thanks :)

@smirki
Copy link

smirki commented Dec 10, 2017

Another noob question: How do we save the output files to our own filesystem?

@crisbal
Copy link
Owner

crisbal commented Dec 10, 2017

@amirkhanaursrk If they are in the location of the folder you mounted when you stop the docker container they should still be there.

For example if you mount the folder ~/mydata

docker run -it -v ~/mydata:/root/torch-rnn/data2 crisbal/torch-rnn:base bash

all the files placed in the folder /root/torch-rnn/data2 will be synced with ~/mydata

@smirki
Copy link

smirki commented Dec 10, 2017

Thank you! That sure does work!

@SebastianVarma
Copy link

SebastianVarma commented May 4, 2018

One last noob question - how should one go about sampling in a detached setting with docker?
I tried the following script after copying the files generated by the training to my home directory:
#!/bin/bash
docker rm -f $(docker ps -aq)
docker run --rm --name container_container -tid crisbal/torch-rnn:base bash
docker cp torch-rnn/cv/ container_container:/root/torch-rnn
OUTPUT=$(docker exec -it container_container th sample.lua -checkpoint cv/checkpoint32100.t7 -length 200 -gpu -1)
echo $OUTPUT
The script failed on the OUTPUT line, giving the following error:
/root/torch/install/bin/luajit: cannot open <cv/checkpoint32100.t7> in mode r at [C]: at 0x00406670l/lib/luarocks/rocks/trepl/scm-1/bin/th:145: in main chunk

When I sample directly from a shell in the container, there is no issue.

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