diff --git a/base/bootstrap.sh b/base/bootstrap.sh index 0742d82..2e3b6e7 100755 --- a/base/bootstrap.sh +++ b/base/bootstrap.sh @@ -12,10 +12,7 @@ if [ -d /workspace ]; then cd /workspace fi -if ! grep -q *.py per_process_gpu_memory_fraction; then - echo "Resourse usage limitation not set!" - exit 1 -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 $@ diff --git a/tensorflow/1.14-gpu/Dockerfile b/tensorflow/1.14-gpu/Dockerfile new file mode 100644 index 0000000..76fe31b --- /dev/null +++ b/tensorflow/1.14-gpu/Dockerfile @@ -0,0 +1,13 @@ +FROM tensorflow/tensorflow:1.14.0-gpu + +MAINTAINER Newnius + +USER root + +RUN apt update && \ + apt install -y git && \ + rm -rf /var/lib/apt/lists/* + +ADD bootstrap.sh /etc/bootstrap.sh + +ENTRYPOINT ["/etc/bootstrap.sh"] diff --git a/tensorflow/1.14-gpu/bootstrap.sh b/tensorflow/1.14-gpu/bootstrap.sh new file mode 100755 index 0000000..2e3b6e7 --- /dev/null +++ b/tensorflow/1.14-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 $@ +