You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

Dockerfile 1.5 kB

4 years ago
1234567891011121314151617181920212223242526272829303132333435
  1. # Build args.
  2. # * Accepted Values:
  3. # - Python 2 + CPU: "latest" => --build-arg TF_CONTAINER_VERSION="latest"
  4. # - Python 2 + GPU: "latest-gpu" => --build-arg TF_CONTAINER_VERSION="latest-gpu"
  5. # - Python 3 + CPU: "latest-py3" => --build-arg TF_CONTAINER_VERSION="latest-py3"
  6. # - Python 3 + GPU: "latest-gpu-py3" => --build-arg TF_CONTAINER_VERSION="latest-gpu-py3"
  7. ARG TF_CONTAINER_VERSION
  8. FROM tensorflow/tensorflow:${TF_CONTAINER_VERSION}
  9. LABEL version="1.0" maintainer="Jonathan DEKHTIAR <contact@jonathandekhtiar.eu>"
  10. ARG TL_VERSION
  11. ARG TF_CONTAINER_VERSION
  12. RUN echo "Container Tag: ${TF_CONTAINER_VERSION}" \
  13. && apt-get update \
  14. && case $TF_CONTAINER_VERSION in \
  15. latest-py3 | latest-gpu-py3) apt-get install -y python3-tk ;; \
  16. *) apt-get install -y python-tk ;; \
  17. esac \
  18. && if [ -z "$TL_VERSION" ]; then \
  19. echo "Building a Nightly Release" \
  20. && apt-get install -y git \
  21. && mkdir /dist/ && cd /dist/ \
  22. && git clone https://github.com/tensorlayer/tensorlayer.git \
  23. && cd tensorlayer \
  24. && pip install --disable-pip-version-check --no-cache-dir --upgrade -e .[all]; \
  25. else \
  26. echo "Building Tag Release: $TL_VERSION" \
  27. && pip install --disable-pip-version-check --no-cache-dir --upgrade tensorlayer[all]=="$TL_VERSION"; \
  28. fi \
  29. && apt-get autoremove -y \
  30. && rm -rf /var/lib/apt/lists/*

TensorLayer3.0 是一款兼容多种深度学习框架为计算后端的深度学习库。计划兼容TensorFlow, Pytorch, MindSpore, Paddle.