mirror of
https://github.com/newnius/YAO-Dockerfiles.git
synced 2025-06-06 15:51:56 +00:00
add tf 2.1
This commit is contained in:
parent
298bd94998
commit
05480f249a
15
tensorflow/2.1-gpu/Dockerfile
Normal file
15
tensorflow/2.1-gpu/Dockerfile
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
FROM tensorflow/tensorflow:2.1.0-gpu-py3
|
||||||
|
|
||||||
|
MAINTAINER Newnius <newnius.cn@gmail.com>
|
||||||
|
|
||||||
|
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"]
|
19
tensorflow/2.1-gpu/bootstrap.sh
Executable file
19
tensorflow/2.1-gpu/bootstrap.sh
Executable file
@ -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 $@
|
||||||
|
|
Loading…
Reference in New Issue
Block a user