Sign inSign up

jmartinezot/ml-base

By jmartinezot

Updated 10 months ago

Common Python software for machine learning

Image
Machine learning & AI
0

787

jmartinezot/ml-base repository overview

Image that contains, among other software:

  • ipython
  • numpy
  • pandas
  • sklearn
  • scipy
  • opencv
  • matplotlib
  • seaborn
  • plotly
  • jupyter
  • numba
  • cython
  • snakeviz
  • line_profiler
  • memory_profiler

Dockerfile

# To build this image:
# docker build -f ml-base.docker -t ml-base .
# 
# To run a container:
# docker run -it --rm ml-base
# 
# 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)/ml-base-tmp,target=/tmp  ml-base
# 
# 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)/ml-base-tmp,target=/tmp: Binds the host's $(echo $HOME)/ml-base-tmp directory to the container's /tmp directory. This allows sharing of files between the host and the container, particularly useful for temporary storage.

# Download base image Ubuntu
FROM ubuntu:22.04 # for the tag ubuntu22.04
# Download base image Nvidia
FROM nvidia/cuda:11.8.0-cudnn8-devel-ubuntu22.04 # for the tag cuda11.8.0-cudnn8-devel-ubuntu22.04

# LABEL about the custom image
LABEL version="0.1"
LABEL description="ml-base"

# Disable Prompt During Packages Installation
ARG DEBIAN_FRONTEND=noninteractive

RUN apt-get update -y && apt-get install -y python3=3.10.6-1~22.04 python3-pip=22.0.2+dfsg-1ubuntu0.4
RUN pip3 install ipython==8.24.0

RUN pip3 install numpy==1.26.4 pandas==2.2.2 scikit-learn==1.5.0 scipy==1.13.1 opencv-python==4.10.0.82
RUN pip3 install matplotlib==3.9.0 seaborn==0.13.2 plotly==5.22.0
RUN pip3 install jupyter==1.0.0

RUN apt install -y libgl1-mesa-glx=23.0.4-0ubuntu1~22.04.1 libglib2.0-0=2.72.4-0ubuntu2.3
RUN apt install -y libxcb-xinerama0=1.14-3ubuntu3 libqt5widgets5=5.15.3+dfsg-2ubuntu0.2 libqt5gui5=5.15.3+dfsg-2ubuntu0.2 libqt5core5a=5.15.3+dfsg-2ubuntu0.2

# Accelerating
RUN pip3 install numba==0.59.1
RUN pip3 install cython==3.0.10

# Profiling
RUN pip3 install snakeviz==2.2.0
RUN pip3 install line_profiler==4.1.3 memory_profiler==0.61.0

COPY ml-base.readme.txt /
COPY ml-base.docker /
CMD cat /ml-base.readme.txt && /bin/bash

Tag summary

Content type

Image

Digest

sha256:5749c0c10

Size

4.6 GB

Last updated

10 months ago

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