diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..c359250 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,29 @@ +FROM nvidia/cuda:10.1-cudnn7-devel-ubuntu18.04 +LABEL maintainer="oeslle.lucena@gmail.com" + +# Set up environment +RUN DEBIAN_FRONTEND="noninteractive" apt-get update \ + && apt-get install -y \ + dialog apt-utils \ + curl \ + htop \ + nano \ + tmux \ + git \ + python3 \ + python3-pip \ + protobuf-compiler + +# Install TaPAS +RUN cd /home \ + && git clone https://github.com/google-research/tapas.git \ + && cd tapas \ + && pip3 install --upgrade pip \ + && pip install --upgrade setuptools \ + && pip install --upgrade six \ + && pip install scipy==1.4.1 \ + && pip install oauth2client==4.1.2 \ + && pip install -e . \ + && pip install tox \ + && tox + diff --git a/README.md b/README.md index a5ed026..7df2f48 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,22 @@ pip install tox tox ``` +### Docker +You can also directly use TAPAS via Docker. NVIDIA driver and Docker 19.03+ must be installed beforehand. There is no need to install the CUDA toolkit on the host, but the driver needs to be installed. More details can be found on [nvidia-docker](https://github.com/NVIDIA/nvidia-docker). + +#### Build Image +To build a docker image you can call the following command in the same folder the `Dockerfile` is: + +``` +docker build --tag tapas:latest . +``` + +Then, you can simply call the following command to run image: + +``` +docker run -it --gpus all -v /absolute/path/to/my/data/directory:/home/data tapas:latest +``` + ## Data See the section below for the pre-training data.