comparison Docker/Dockerfile @ 1:84f96c952c2c draft default tip

planemo upload for repository https://github.com/goeckslab/gleam.git commit 5b6cd961948137853177b14b0fff80a5d40e8a07
author goeckslab
date Sun, 09 Nov 2025 19:03:21 +0000
parents 38333676a029
children
comparison
equal deleted inserted replaced
0:38333676a029 1:84f96c952c2c
1 # Use a lightweight Python 3.9 base image 1 # Use NVIDIA CUDA base image for GPU support
2 FROM python:3.9-slim 2 FROM nvidia/cuda:11.8-devel-ubuntu20.04
3 3
4 # Install system dependencies for OpenCV and other libraries in one layer 4 # Set environment variables
5 ENV DEBIAN_FRONTEND=noninteractive
6 ENV PYTHONUNBUFFERED=1
7
8 # Install system dependencies
5 RUN apt-get update && apt-get install -y \ 9 RUN apt-get update && apt-get install -y \
10 python3 \
11 python3-pip \
12 python3-dev \
6 libgl1-mesa-glx \ 13 libgl1-mesa-glx \
7 libglib2.0-0 \ 14 libglib2.0-0 \
15 git \
16 wget \
8 && rm -rf /var/lib/apt/lists/* 17 && rm -rf /var/lib/apt/lists/*
9 18
10 # Upgrade pip to the latest version 19 # Create symbolic links for python
20 RUN ln -s /usr/bin/python3 /usr/bin/python && \
21 ln -s /usr/bin/pip3 /usr/bin/pip
22
23 # Upgrade pip
11 RUN pip install --upgrade pip 24 RUN pip install --upgrade pip
12 25
13 # Install PyTorch and torchvision CPU-only versions 26 # Install PyTorch with CUDA support
14 RUN pip install --no-cache-dir torch==2.0.0 torchvision==0.15.1 \ 27 RUN pip install --no-cache-dir torch==2.0.0 torchvision==0.15.1 \
15 -f https://download.pytorch.org/whl/cpu/torch_stable.html 28 -f https://download.pytorch.org/whl/cu118/torch_stable.html
16 29
17 # Install NumPy with a version compatible with PyTorch 2.0.0 30 # Install NumPy with a version compatible with PyTorch 2.0.0
18 RUN pip install --no-cache-dir numpy==1.24.4 31 RUN pip install --no-cache-dir numpy==1.24.4
19 32
20 # Install remaining Python dependencies 33 # Install timm for model support (quote to prevent shell redirection)
21 RUN pip install --no-cache-dir Pillow opencv-python pandas fastparquet argparse logging multiprocessing 34 RUN pip install --no-cache-dir 'timm>=1.0.3'
35
36 # Install remaining Python dependencies (exclude stdlib packages, add requests for GPFM)
37 RUN pip install --no-cache-dir Pillow opencv-python pandas fastparquet requests
38
39 # Install HuggingFace transformers for model loading
40 RUN pip install --no-cache-dir transformers huggingface-hub
41
42 # Set working directory
43 WORKDIR /workspace
44
45 # Create cache directory for HuggingFace models
46 RUN mkdir -p /workspace/hf_cache
47 ENV HF_HOME=/workspace/hf_cache
48 ENV TORCH_HOME=/workspace/hf_cache