Sign inSign up

jmartinezot/tf

By jmartinezot

Updated 10 months ago

Tensorflow image

Image
Machine learning & AI
0

291

jmartinezot/tf repository overview

Image built on jmartinezot/keras.

Dockerfile

# To build this image:
# docker build -f tf.docker -t tf .
# 
# To run a container:
# docker run -it --rm tf
# 
# With more options:
# docker run -it --rm -e DISPLAY=unix$DISPLAY --mount type=bind,source=/tmp/.X11-unix,target=/tmp/.X11-unix --device /dev/video0 --mount type=bind,source=$(echo $HOME)/tf-tmp,target=/tmp tf
# 
# Options explained:
# -it: This combines -i (interactive) and -t (pseudo-TTY) options to allow for interactive terminal sessions within the container.
# --rm: Automatically removes the container once it exits to prevent leftover containers.
# -e DISPLAY=unix$DISPLAY: Sets the DISPLAY environment variable to enable GUI applications to display on the host's X server.
# --mount type=bind,source=/tmp/.X11-unix,target=/tmp/.X11-unix: Binds the host's /tmp/.X11-unix directory to the container's /tmp/.X11-unix directory. This is necessary for X11 communication between the container and the host, allowing GUI applications to display on the host.
# --device /dev/video0: Grants the container access to the host's /dev/video0 device, which is typically used for webcams or other video capture devices.
# --mount type=bind,source=$(echo $HOME)/tf-tmp,target=/tmp: Binds the host's $(echo $HOME)/tf-tmp directory to the container's /tmp directory. This allows sharing of files between the host and the container, particularly useful for temporary storage.

# FOR THE TAG ubuntu22.04
# Download base image keras
FROM jmartinezot/keras:ubuntu22.04

# FOR THE TAG cuda11.8.0-cudnn8-devel-ubuntu22.04
# Download base image keras
FROM jmartinezot/keras:cuda11.8.0-cudnn8-devel-ubuntu22.04

# LABEL about the custom image
LABEL version="0.1"
LABEL description="tf"

# Disable Prompt During Packages Installation
ARG DEBIAN_FRONTEND=noninteractive

# FOR THE TAG ubuntu22.04
RUN pip3 install tensorflow==2.16.1

# FOR THE TAG cuda11.8.0-cudnn8-devel-ubuntu22.04
RUN pip3 install --extra-index-url https://pypi.nvidia.com tensorrt-bindings==8.6.1 tensorrt-libs==8.6.1
RUN pip3 install -U tensorflow[and-cuda]==2.15.0

COPY tf.readme.txt /
COPY tf.docker /
CMD cat /tf.readme.txt && /bin/bash

Tag summary

Content type

Image

Digest

sha256:ffe339d31

Size

7.7 GB

Last updated

10 months ago

docker pull jmartinezot/tf:cuda13.0.2-cudnn-devel-ubuntu24.04