Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
gpt-2-server
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Paul Geisler
gpt-2-server
Commits
99af6d70
Commit
99af6d70
authored
Feb 14, 2019
by
Madison May
Committed by
Jeff Wu
Feb 20, 2019
Browse files
Options
Downloads
Patches
Plain Diff
Add a Dockerfile and document usage in README
parent
23ed990b
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
Dockerfile.cpu
+12
-0
12 additions, 0 deletions
Dockerfile.cpu
Dockerfile.gpu
+21
-0
21 additions, 0 deletions
Dockerfile.gpu
README.md
+17
-0
17 additions, 0 deletions
README.md
with
50 additions
and
0 deletions
Dockerfile.cpu
0 → 100644
+
12
−
0
View file @
99af6d70
FROM tensorflow/tensorflow:1.12.0-py3
ENV LANG=C.UTF-8
RUN mkdir /gpt-2
WORKDIR /gpt-2
COPY requirements.txt download_model.sh /gpt-2/
RUN apt-get update && \
apt-get install -y curl && \
sh download_model.sh 117M
RUN pip3 install -r requirements.txt
ADD . /gpt-2
This diff is collapsed.
Click to expand it.
Dockerfile.gpu
0 → 100644
+
21
−
0
View file @
99af6d70
FROM tensorflow/tensorflow:1.12.0-gpu-py3
# nvidia-docker 1.0
LABEL com.nvidia.volumes.needed="nvidia_driver"
LABEL com.nvidia.cuda.version="${CUDA_VERSION}"
# nvidia-container-runtime
ENV NVIDIA_VISIBLE_DEVICES=all \
NVIDIA_DRIVER_CAPABILITIES=compute,utility \
NVIDIA_REQUIRE_CUDA="cuda>=8.0" \
LANG=C.UTF-8
RUN mkdir /gpt-2
WORKDIR /gpt-2
COPY requirements.txt download_model.sh /gpt-2/
RUN apt-get update && \
apt-get install -y curl && \
sh download_model.sh 117M
RUN pip3 install -r requirements.txt
ADD . /gpt-2
This diff is collapsed.
Click to expand it.
README.md
+
17
−
0
View file @
99af6d70
...
...
@@ -13,6 +13,8 @@ Git clone this repository, and `cd` into directory for remaining commands
git clone https://github.com/openai/gpt-2.git && cd gpt-2
```
### Native Installation
Download the model data
```
sh download_model.sh 117M
...
...
@@ -34,6 +36,21 @@ Install other python packages:
pip3 install -r requirements.txt
```
### Docker Installation
Build the Dockerfile and tag the created image as
`gpt-2`
:
```
docker build --tag gpt-2 -f Dockerfile.gpu . # or Dockerfile.cpu
```
Start an interactive bash session from the
`gpt-2`
docker image.
You can opt to use the
`--runtime=nvidia`
flag if you have access to a NVIDIA GPU
and a valid install of
[
nvidia-docker 2.0
](
https://github.com/nvidia/nvidia-docker/wiki/Installation-(version-2.0
)
).
```
docker run --runtime=nvidia -it gpt-2 bash
```
## Usage
| WARNING: Samples are unfiltered and may contain offensive content. |
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment