-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #41 from octoenergy/update
Update to tf 2.8 and python 3.9 and drop s3fs dependency
- Loading branch information
Showing
23 changed files
with
1,959 additions
and
1,240 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,7 +19,7 @@ sync: | |
pipenv sync --dev | ||
|
||
lock: | ||
pipenv lock --dev | ||
pipenv lock --dev | ||
|
||
test: | ||
pipenv run pytest tests/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,28 @@ | ||
# tensorflow no cpu and running python 3.6 | ||
# Loosely based in what tensorflow tools generate. | ||
# More info | ||
ARG UBUNTU_VERSION=18.04 | ||
ARG UBUNTU_VERSION=20.04 | ||
|
||
FROM ubuntu:${UBUNTU_VERSION} as base | ||
|
||
# See http://bugs.python.org/issue19846 | ||
ENV LANG C.UTF-8 | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
build-essential \ | ||
curl \ | ||
software-properties-common \ | ||
python3.6 python3.6-dev python3-distutils\ | ||
python3.9 python3.9-dev python3-distutils\ | ||
&& \ | ||
apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && python3.6 get-pip.py && rm get-pip.py | ||
RUN python3.6 -m pip install --no-cache-dir -U pip | ||
RUN python3.6 -m pip install --no-cache-dir -U setuptools | ||
RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && python3.9 get-pip.py && rm get-pip.py | ||
RUN python3.9 -m pip install --no-cache-dir -U pip | ||
RUN python3.9 -m pip install --no-cache-dir -U setuptools | ||
# Some TF tools expect a "python" binary | ||
RUN ln -s /usr/bin/python3.6 /usr/local/bin/python | ||
RUN ln -s /usr/bin/python3.9 /usr/local/bin/python | ||
|
||
ARG TF_PACKAGE=tensorflow | ||
RUN pip install ${TF_PACKAGE} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,57 +1,73 @@ | ||
# tensorflow with cuda 9 and running python 3.6 | ||
# Loosely based in what tensorflow tools generate. | ||
# More info | ||
ARG UBUNTU_VERSION=16.04 | ||
# tensorflow with cuda 11.2 and running python 3.9 | ||
# Loosely based in what tensorflow tools generate. | ||
ARG UBUNTU_VERSION=20.04 | ||
ARG CUDA=11.2 | ||
FROM nvidia/cuda:${CUDA}.1-base-ubuntu${UBUNTU_VERSION} as base | ||
|
||
FROM nvidia/cuda:9.0-base-ubuntu${UBUNTU_VERSION} as base | ||
# CUDA is specified again because the FROM directive resets ARGs | ||
# (but the default value is retained if set previously) | ||
ARG CUDA | ||
ARG CUDNN=8.1.0.77-1 | ||
ARG LIBNVINFER=7.2.2-1 | ||
ARG LIBNVINFER_MAJOR_VERSION=7 | ||
|
||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
# Needed for string substitution | ||
SHELL ["/bin/bash", "-c"] | ||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
build-essential \ | ||
cuda-command-line-tools-9-0 \ | ||
cuda-cublas-9-0 \ | ||
cuda-cufft-9-0 \ | ||
cuda-curand-9-0 \ | ||
cuda-cusolver-9-0 \ | ||
cuda-cusparse-9-0 \ | ||
cuda-command-line-tools-${CUDA/./-} \ | ||
libcublas-${CUDA/./-} \ | ||
cuda-nvrtc-${CUDA/./-} \ | ||
libcufft-${CUDA/./-} \ | ||
libcurand-${CUDA/./-} \ | ||
libcusolver-${CUDA/./-} \ | ||
libcusparse-${CUDA/./-} \ | ||
curl \ | ||
libcudnn7=7.2.1.38-1+cuda9.0 \ | ||
libnccl2=2.2.13-1+cuda9.0 \ | ||
libcudnn8=${CUDNN}+cuda${CUDA} \ | ||
libfreetype6-dev \ | ||
libhdf5-serial-dev \ | ||
libpng12-dev \ | ||
libzmq3-dev \ | ||
pkg-config \ | ||
rsync \ | ||
software-properties-common \ | ||
unzip \ | ||
&& \ | ||
apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* | ||
unzip | ||
|
||
RUN apt-get update && \ | ||
apt-get install nvinfer-runtime-trt-repo-ubuntu1604-4.0.1-ga-cuda9.0 && \ | ||
apt-key adv --fetch-keys \ | ||
https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/7fa2af80.pub && \ | ||
echo "deb https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64 /" > /etc/apt/sources.list.d/tensorRT.list && \ | ||
apt-get update && \ | ||
apt-get install libnvinfer4=4.1.2-1+cuda9.0 | ||
apt-get install -y --no-install-recommends \ | ||
libnvinfer${LIBNVINFER_MAJOR_VERSION}=${LIBNVINFER}+cuda11.0 \ | ||
libnvinfer-plugin${LIBNVINFER_MAJOR_VERSION}=${LIBNVINFER}+cuda11.0 \ | ||
&& \ | ||
apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
# For CUDA profiling, TensorFlow requires CUPTI. | ||
ENV LD_LIBRARY_PATH /usr/local/cuda/extras/CUPTI/lib64:$LD_LIBRARY_PATH | ||
ENV LD_LIBRARY_PATH /usr/local/cuda-11.0/targets/x86_64-linux/lib:/usr/local/cuda/extras/CUPTI/lib64:/usr/local/cuda/lib64:$LD_LIBRARY_PATH | ||
|
||
# Link the libcuda stub to the location where tensorflow is searching for it and reconfigure | ||
# dynamic linker run-time bindings | ||
RUN ln -s /usr/local/cuda/lib64/stubs/libcuda.so /usr/local/cuda/lib64/stubs/libcuda.so.1 \ | ||
&& echo "/usr/local/cuda/lib64/stubs" > /etc/ld.so.conf.d/z-cuda-stubs.conf \ | ||
&& ldconfig | ||
|
||
# See http://bugs.python.org/issue19846 | ||
ENV LANG C.UTF-8 | ||
|
||
RUN apt-get update \ | ||
&& add-apt-repository -y ppa:deadsnakes/ppa \ | ||
&& apt-get update \ | ||
&& apt-get install -y python3.6 python3.6-dev python3.6-venv \ | ||
&& apt-get install -y python3.9 python3.9-dev python3.9-venv \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && python3.6 get-pip.py && rm get-pip.py | ||
RUN python3.6 -m pip install --no-cache-dir -U pip | ||
RUN python3.6 -m pip install --no-cache-dir -U setuptools | ||
RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && python3.9 get-pip.py && rm get-pip.py | ||
RUN python3.9 -m pip install --no-cache-dir -U pip | ||
RUN python3.9 -m pip install --no-cache-dir -U setuptools | ||
# Some TF tools expect a "python" binary | ||
RUN ln -s /usr/bin/python3.6 /usr/local/bin/python | ||
RUN ln -s /usr/bin/python3.9 /usr/local/bin/python | ||
|
||
ARG TF_PACKAGE=tensorflow-gpu | ||
RUN pip install ${TF_PACKAGE} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,12 @@ | ||
# Tensorflow 1.12 + Python 3.6 images | ||
# Tensorflow 1.12 + Python 3.9 images | ||
|
||
Official tensorflow 1.12 docker images don't really fit our needs as they depend on python3.5 rather than pyton3.6. For this reason two docker files can be find in the `dockerfiles` folder, one for a cpu image and another for gpu image. | ||
Official tensorflow 1.12 docker images don't really fit our needs as they depend on python3.8 | ||
rather than python 3.9. For this reason two docker files can be find in the `dockerfiles` folder, | ||
one for a cpu image and another for gpu image. | ||
|
||
These images live publicly in our (docker hub)[https://hub.docker.com/r/krakentechnologies/tensorflow/]. | ||
These images live publicly in our [docker hub][kraken_docker]. | ||
|
||
More info about (docker and tensorflow)[https://github.com/tensorflow/tensorflow/tree/master/tensorflow/tools/dockerfiles] | ||
More info about [docker and tensorflow][tensorflow_dockerfiles] | ||
|
||
[kraken_docker]: https://hub.docker.com/r/krakentechnologies/tensorflow/. | ||
[tensorflow_dockerfiles]: https://github.com/tensorflow/tensorflow/tree/master/tensorflow/tools/dockerfiles |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.