diff --git a/tensorflow/2.1-gpu/Dockerfile b/tensorflow/2.1-gpu/Dockerfile new file mode 100644 index 0000000..d6c003c --- /dev/null +++ b/tensorflow/2.1-gpu/Dockerfile @@ -0,0 +1,15 @@ +FROM tensorflow/tensorflow:2.1.0-gpu-py3 + +MAINTAINER Newnius + +USER root + +RUN apt update && \ + apt install -y git && \ + rm -rf /var/lib/apt/lists/* + +RUN pip3 install requests psutil py-cpuinfo pandas typing + +ADD bootstrap.sh /etc/bootstrap.sh + +ENTRYPOINT ["/etc/bootstrap.sh"] diff --git a/tensorflow/2.1-gpu/bootstrap.sh b/tensorflow/2.1-gpu/bootstrap.sh new file mode 100755 index 0000000..2e3b6e7 --- /dev/null +++ b/tensorflow/2.1-gpu/bootstrap.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +if ! [[ -z "${repo}" ]]; then + if [[ -z "${branch}" ]]; then + git clone $repo /workspace + else + git clone -b $branch $repo /workspace + fi +fi + +if [ -d /workspace ]; then + cd /workspace +fi + +sleep infinity + +# use eval because commands likes `key=value command` would cause file not found error when using $@, but this eval will ruin current environment +eval $@ +