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
Add a Dockerfile and ignore example artifacts #15
Conversation
137065a
to
19327c1
Compare
You may want to add a CPU dockerfile as well. |
Good call. Note that dependency installation in |
a |
a28d5e8
to
5db0733
Compare
Dockerfile.gpu
Outdated
|
||
RUN apt-get update && \ | ||
mkdir /gpt-2 && \ | ||
pip3 install fire==0.1.3 regex==2017.4.5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, I should remove tensorflow from the requirements.txt perhaps?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
^ did so, so you can install from requirements.txt
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, thanks for the change, it's kind of unfortunate that tensorflow installs don't play nice with requirements.txt files.
@madisonmay I just added a LICENSE (#10) - do you agree to license your contribution under the MIT license? Thanks! |
.gitignore
Outdated
@@ -1,2 +1,4 @@ | |||
__pycache__ | |||
models/ | |||
samples |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i don't think this needs to be in .gitignore
, i could update the README to tee to /tmp/
or something
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll remove the .gitignore changes then.
.gitignore
Outdated
@@ -1,2 +1,4 @@ | |||
__pycache__ | |||
models/ | |||
samples | |||
core |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tensorflow core dump file... probably not strictly necessary here either. I'll remove.
Dockerfile.gpu
Outdated
WORKDIR /gpt-2 | ||
ADD . /gpt-2 | ||
|
||
CMD ["sleep", "infinity"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are these really necessary? i would remove it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds reasonable, better to assume nothing about how someone might intend to use the Docker container.
thanks @madisonmay for the contribution! do you mind also adding instructions on docker install to the README? (feel free to rearrange stuff a bit) |
Happy to, held off on that because I didn't want to add any unnecessary cruft to your tidy readme. Will push that up shortly w/ the other edits. |
506c278
to
b9ef977
Compare
Added a README section, removed the .gitignore changes, and squashed the commits back down. Also moved the model download into the Dockerfile now that the master branch uses curl instead of gsutil to download the model files and opening up a browser to auth with google isn't required. |
@madisonmay I just added a LICENSE (#10) - do you agree to license your contribution under the MIT license? Thanks! |
And yes, absolutely! Thanks for the re-ping on that. |
README.md
Outdated
@@ -34,6 +34,21 @@ Install other python packages: | |||
pip3 install -r requirements.txt | |||
``` | |||
|
|||
## Docker Installation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe ###
?
And add another sub-heading "## Plain installation" (or something similar) before "Download the model data"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good to me, pushing up that change now.
b9ef977
to
a189035
Compare
If you'd like, here's a Dockerfile to toss up as an alternate installation method.
Also quickly gitignored the
samples
file andcore
file generated by running the example in the README.