annotate 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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
84f96c952c2c planemo upload for repository https://github.com/goeckslab/gleam.git commit 5b6cd961948137853177b14b0fff80a5d40e8a07
goeckslab
parents: 0
diff changeset
1 # Use NVIDIA CUDA base image for GPU support
84f96c952c2c planemo upload for repository https://github.com/goeckslab/gleam.git commit 5b6cd961948137853177b14b0fff80a5d40e8a07
goeckslab
parents: 0
diff changeset
2 FROM nvidia/cuda:11.8-devel-ubuntu20.04
0
38333676a029 planemo upload for repository https://github.com/goeckslab/gleam.git commit f57ec1ad637e8299db265ee08be0fa9d4d829b93
goeckslab
parents:
diff changeset
3
1
84f96c952c2c planemo upload for repository https://github.com/goeckslab/gleam.git commit 5b6cd961948137853177b14b0fff80a5d40e8a07
goeckslab
parents: 0
diff changeset
4 # Set environment variables
84f96c952c2c planemo upload for repository https://github.com/goeckslab/gleam.git commit 5b6cd961948137853177b14b0fff80a5d40e8a07
goeckslab
parents: 0
diff changeset
5 ENV DEBIAN_FRONTEND=noninteractive
84f96c952c2c planemo upload for repository https://github.com/goeckslab/gleam.git commit 5b6cd961948137853177b14b0fff80a5d40e8a07
goeckslab
parents: 0
diff changeset
6 ENV PYTHONUNBUFFERED=1
84f96c952c2c planemo upload for repository https://github.com/goeckslab/gleam.git commit 5b6cd961948137853177b14b0fff80a5d40e8a07
goeckslab
parents: 0
diff changeset
7
84f96c952c2c planemo upload for repository https://github.com/goeckslab/gleam.git commit 5b6cd961948137853177b14b0fff80a5d40e8a07
goeckslab
parents: 0
diff changeset
8 # Install system dependencies
0
38333676a029 planemo upload for repository https://github.com/goeckslab/gleam.git commit f57ec1ad637e8299db265ee08be0fa9d4d829b93
goeckslab
parents:
diff changeset
9 RUN apt-get update && apt-get install -y \
1
84f96c952c2c planemo upload for repository https://github.com/goeckslab/gleam.git commit 5b6cd961948137853177b14b0fff80a5d40e8a07
goeckslab
parents: 0
diff changeset
10 python3 \
84f96c952c2c planemo upload for repository https://github.com/goeckslab/gleam.git commit 5b6cd961948137853177b14b0fff80a5d40e8a07
goeckslab
parents: 0
diff changeset
11 python3-pip \
84f96c952c2c planemo upload for repository https://github.com/goeckslab/gleam.git commit 5b6cd961948137853177b14b0fff80a5d40e8a07
goeckslab
parents: 0
diff changeset
12 python3-dev \
0
38333676a029 planemo upload for repository https://github.com/goeckslab/gleam.git commit f57ec1ad637e8299db265ee08be0fa9d4d829b93
goeckslab
parents:
diff changeset
13 libgl1-mesa-glx \
38333676a029 planemo upload for repository https://github.com/goeckslab/gleam.git commit f57ec1ad637e8299db265ee08be0fa9d4d829b93
goeckslab
parents:
diff changeset
14 libglib2.0-0 \
1
84f96c952c2c planemo upload for repository https://github.com/goeckslab/gleam.git commit 5b6cd961948137853177b14b0fff80a5d40e8a07
goeckslab
parents: 0
diff changeset
15 git \
84f96c952c2c planemo upload for repository https://github.com/goeckslab/gleam.git commit 5b6cd961948137853177b14b0fff80a5d40e8a07
goeckslab
parents: 0
diff changeset
16 wget \
0
38333676a029 planemo upload for repository https://github.com/goeckslab/gleam.git commit f57ec1ad637e8299db265ee08be0fa9d4d829b93
goeckslab
parents:
diff changeset
17 && rm -rf /var/lib/apt/lists/*
38333676a029 planemo upload for repository https://github.com/goeckslab/gleam.git commit f57ec1ad637e8299db265ee08be0fa9d4d829b93
goeckslab
parents:
diff changeset
18
1
84f96c952c2c planemo upload for repository https://github.com/goeckslab/gleam.git commit 5b6cd961948137853177b14b0fff80a5d40e8a07
goeckslab
parents: 0
diff changeset
19 # Create symbolic links for python
84f96c952c2c planemo upload for repository https://github.com/goeckslab/gleam.git commit 5b6cd961948137853177b14b0fff80a5d40e8a07
goeckslab
parents: 0
diff changeset
20 RUN ln -s /usr/bin/python3 /usr/bin/python && \
84f96c952c2c planemo upload for repository https://github.com/goeckslab/gleam.git commit 5b6cd961948137853177b14b0fff80a5d40e8a07
goeckslab
parents: 0
diff changeset
21 ln -s /usr/bin/pip3 /usr/bin/pip
84f96c952c2c planemo upload for repository https://github.com/goeckslab/gleam.git commit 5b6cd961948137853177b14b0fff80a5d40e8a07
goeckslab
parents: 0
diff changeset
22
84f96c952c2c planemo upload for repository https://github.com/goeckslab/gleam.git commit 5b6cd961948137853177b14b0fff80a5d40e8a07
goeckslab
parents: 0
diff changeset
23 # Upgrade pip
0
38333676a029 planemo upload for repository https://github.com/goeckslab/gleam.git commit f57ec1ad637e8299db265ee08be0fa9d4d829b93
goeckslab
parents:
diff changeset
24 RUN pip install --upgrade pip
38333676a029 planemo upload for repository https://github.com/goeckslab/gleam.git commit f57ec1ad637e8299db265ee08be0fa9d4d829b93
goeckslab
parents:
diff changeset
25
1
84f96c952c2c planemo upload for repository https://github.com/goeckslab/gleam.git commit 5b6cd961948137853177b14b0fff80a5d40e8a07
goeckslab
parents: 0
diff changeset
26 # Install PyTorch with CUDA support
0
38333676a029 planemo upload for repository https://github.com/goeckslab/gleam.git commit f57ec1ad637e8299db265ee08be0fa9d4d829b93
goeckslab
parents:
diff changeset
27 RUN pip install --no-cache-dir torch==2.0.0 torchvision==0.15.1 \
1
84f96c952c2c planemo upload for repository https://github.com/goeckslab/gleam.git commit 5b6cd961948137853177b14b0fff80a5d40e8a07
goeckslab
parents: 0
diff changeset
28 -f https://download.pytorch.org/whl/cu118/torch_stable.html
0
38333676a029 planemo upload for repository https://github.com/goeckslab/gleam.git commit f57ec1ad637e8299db265ee08be0fa9d4d829b93
goeckslab
parents:
diff changeset
29
38333676a029 planemo upload for repository https://github.com/goeckslab/gleam.git commit f57ec1ad637e8299db265ee08be0fa9d4d829b93
goeckslab
parents:
diff changeset
30 # Install NumPy with a version compatible with PyTorch 2.0.0
38333676a029 planemo upload for repository https://github.com/goeckslab/gleam.git commit f57ec1ad637e8299db265ee08be0fa9d4d829b93
goeckslab
parents:
diff changeset
31 RUN pip install --no-cache-dir numpy==1.24.4
38333676a029 planemo upload for repository https://github.com/goeckslab/gleam.git commit f57ec1ad637e8299db265ee08be0fa9d4d829b93
goeckslab
parents:
diff changeset
32
1
84f96c952c2c planemo upload for repository https://github.com/goeckslab/gleam.git commit 5b6cd961948137853177b14b0fff80a5d40e8a07
goeckslab
parents: 0
diff changeset
33 # Install timm for model support (quote to prevent shell redirection)
84f96c952c2c planemo upload for repository https://github.com/goeckslab/gleam.git commit 5b6cd961948137853177b14b0fff80a5d40e8a07
goeckslab
parents: 0
diff changeset
34 RUN pip install --no-cache-dir 'timm>=1.0.3'
84f96c952c2c planemo upload for repository https://github.com/goeckslab/gleam.git commit 5b6cd961948137853177b14b0fff80a5d40e8a07
goeckslab
parents: 0
diff changeset
35
84f96c952c2c planemo upload for repository https://github.com/goeckslab/gleam.git commit 5b6cd961948137853177b14b0fff80a5d40e8a07
goeckslab
parents: 0
diff changeset
36 # Install remaining Python dependencies (exclude stdlib packages, add requests for GPFM)
84f96c952c2c planemo upload for repository https://github.com/goeckslab/gleam.git commit 5b6cd961948137853177b14b0fff80a5d40e8a07
goeckslab
parents: 0
diff changeset
37 RUN pip install --no-cache-dir Pillow opencv-python pandas fastparquet requests
84f96c952c2c planemo upload for repository https://github.com/goeckslab/gleam.git commit 5b6cd961948137853177b14b0fff80a5d40e8a07
goeckslab
parents: 0
diff changeset
38
84f96c952c2c planemo upload for repository https://github.com/goeckslab/gleam.git commit 5b6cd961948137853177b14b0fff80a5d40e8a07
goeckslab
parents: 0
diff changeset
39 # Install HuggingFace transformers for model loading
84f96c952c2c planemo upload for repository https://github.com/goeckslab/gleam.git commit 5b6cd961948137853177b14b0fff80a5d40e8a07
goeckslab
parents: 0
diff changeset
40 RUN pip install --no-cache-dir transformers huggingface-hub
84f96c952c2c planemo upload for repository https://github.com/goeckslab/gleam.git commit 5b6cd961948137853177b14b0fff80a5d40e8a07
goeckslab
parents: 0
diff changeset
41
84f96c952c2c planemo upload for repository https://github.com/goeckslab/gleam.git commit 5b6cd961948137853177b14b0fff80a5d40e8a07
goeckslab
parents: 0
diff changeset
42 # Set working directory
84f96c952c2c planemo upload for repository https://github.com/goeckslab/gleam.git commit 5b6cd961948137853177b14b0fff80a5d40e8a07
goeckslab
parents: 0
diff changeset
43 WORKDIR /workspace
84f96c952c2c planemo upload for repository https://github.com/goeckslab/gleam.git commit 5b6cd961948137853177b14b0fff80a5d40e8a07
goeckslab
parents: 0
diff changeset
44
84f96c952c2c planemo upload for repository https://github.com/goeckslab/gleam.git commit 5b6cd961948137853177b14b0fff80a5d40e8a07
goeckslab
parents: 0
diff changeset
45 # Create cache directory for HuggingFace models
84f96c952c2c planemo upload for repository https://github.com/goeckslab/gleam.git commit 5b6cd961948137853177b14b0fff80a5d40e8a07
goeckslab
parents: 0
diff changeset
46 RUN mkdir -p /workspace/hf_cache
84f96c952c2c planemo upload for repository https://github.com/goeckslab/gleam.git commit 5b6cd961948137853177b14b0fff80a5d40e8a07
goeckslab
parents: 0
diff changeset
47 ENV HF_HOME=/workspace/hf_cache
84f96c952c2c planemo upload for repository https://github.com/goeckslab/gleam.git commit 5b6cd961948137853177b14b0fff80a5d40e8a07
goeckslab
parents: 0
diff changeset
48 ENV TORCH_HOME=/workspace/hf_cache