annotate Docker/Dockerfile @ 0:c051e9688932 draft default tip

planemo upload for repository https://github.com/goeckslab/gleam.git commit 11356473f09dd54d86af28b74bd9ed097d07ca04
author goeckslab
date Thu, 03 Jul 2025 23:48:01 +0000
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
c051e9688932 planemo upload for repository https://github.com/goeckslab/gleam.git commit 11356473f09dd54d86af28b74bd9ed097d07ca04
goeckslab
parents:
diff changeset
1 FROM debian:stable
c051e9688932 planemo upload for repository https://github.com/goeckslab/gleam.git commit 11356473f09dd54d86af28b74bd9ed097d07ca04
goeckslab
parents:
diff changeset
2
c051e9688932 planemo upload for repository https://github.com/goeckslab/gleam.git commit 11356473f09dd54d86af28b74bd9ed097d07ca04
goeckslab
parents:
diff changeset
3 LABEL maintainer="Paulo Lyra" \
c051e9688932 planemo upload for repository https://github.com/goeckslab/gleam.git commit 11356473f09dd54d86af28b74bd9ed097d07ca04
goeckslab
parents:
diff changeset
4 version="1.0.0" \
c051e9688932 planemo upload for repository https://github.com/goeckslab/gleam.git commit 11356473f09dd54d86af28b74bd9ed097d07ca04
goeckslab
parents:
diff changeset
5 description="Docker image for PyHIST Galaxy tool"
c051e9688932 planemo upload for repository https://github.com/goeckslab/gleam.git commit 11356473f09dd54d86af28b74bd9ed097d07ca04
goeckslab
parents:
diff changeset
6
c051e9688932 planemo upload for repository https://github.com/goeckslab/gleam.git commit 11356473f09dd54d86af28b74bd9ed097d07ca04
goeckslab
parents:
diff changeset
7 # Install necessary tools
c051e9688932 planemo upload for repository https://github.com/goeckslab/gleam.git commit 11356473f09dd54d86af28b74bd9ed097d07ca04
goeckslab
parents:
diff changeset
8 RUN export DEBIAN_FRONTEND=noninteractive && \
c051e9688932 planemo upload for repository https://github.com/goeckslab/gleam.git commit 11356473f09dd54d86af28b74bd9ed097d07ca04
goeckslab
parents:
diff changeset
9 apt-get update --fix-missing -qq && \
c051e9688932 planemo upload for repository https://github.com/goeckslab/gleam.git commit 11356473f09dd54d86af28b74bd9ed097d07ca04
goeckslab
parents:
diff changeset
10 apt-get install -y -q \
c051e9688932 planemo upload for repository https://github.com/goeckslab/gleam.git commit 11356473f09dd54d86af28b74bd9ed097d07ca04
goeckslab
parents:
diff changeset
11 build-essential \
c051e9688932 planemo upload for repository https://github.com/goeckslab/gleam.git commit 11356473f09dd54d86af28b74bd9ed097d07ca04
goeckslab
parents:
diff changeset
12 libgl1-mesa-glx \
c051e9688932 planemo upload for repository https://github.com/goeckslab/gleam.git commit 11356473f09dd54d86af28b74bd9ed097d07ca04
goeckslab
parents:
diff changeset
13 python3 \
c051e9688932 planemo upload for repository https://github.com/goeckslab/gleam.git commit 11356473f09dd54d86af28b74bd9ed097d07ca04
goeckslab
parents:
diff changeset
14 python3-pip \
c051e9688932 planemo upload for repository https://github.com/goeckslab/gleam.git commit 11356473f09dd54d86af28b74bd9ed097d07ca04
goeckslab
parents:
diff changeset
15 python3-venv \
c051e9688932 planemo upload for repository https://github.com/goeckslab/gleam.git commit 11356473f09dd54d86af28b74bd9ed097d07ca04
goeckslab
parents:
diff changeset
16 openslide-tools \
c051e9688932 planemo upload for repository https://github.com/goeckslab/gleam.git commit 11356473f09dd54d86af28b74bd9ed097d07ca04
goeckslab
parents:
diff changeset
17 python3-openslide \
c051e9688932 planemo upload for repository https://github.com/goeckslab/gleam.git commit 11356473f09dd54d86af28b74bd9ed097d07ca04
goeckslab
parents:
diff changeset
18 libmagic-dev \
c051e9688932 planemo upload for repository https://github.com/goeckslab/gleam.git commit 11356473f09dd54d86af28b74bd9ed097d07ca04
goeckslab
parents:
diff changeset
19 git && \
c051e9688932 planemo upload for repository https://github.com/goeckslab/gleam.git commit 11356473f09dd54d86af28b74bd9ed097d07ca04
goeckslab
parents:
diff changeset
20 apt-get clean && \
c051e9688932 planemo upload for repository https://github.com/goeckslab/gleam.git commit 11356473f09dd54d86af28b74bd9ed097d07ca04
goeckslab
parents:
diff changeset
21 rm -rf /var/lib/apt/lists/*
c051e9688932 planemo upload for repository https://github.com/goeckslab/gleam.git commit 11356473f09dd54d86af28b74bd9ed097d07ca04
goeckslab
parents:
diff changeset
22
c051e9688932 planemo upload for repository https://github.com/goeckslab/gleam.git commit 11356473f09dd54d86af28b74bd9ed097d07ca04
goeckslab
parents:
diff changeset
23 # Set working directory
c051e9688932 planemo upload for repository https://github.com/goeckslab/gleam.git commit 11356473f09dd54d86af28b74bd9ed097d07ca04
goeckslab
parents:
diff changeset
24 WORKDIR /pyhist
c051e9688932 planemo upload for repository https://github.com/goeckslab/gleam.git commit 11356473f09dd54d86af28b74bd9ed097d07ca04
goeckslab
parents:
diff changeset
25
c051e9688932 planemo upload for repository https://github.com/goeckslab/gleam.git commit 11356473f09dd54d86af28b74bd9ed097d07ca04
goeckslab
parents:
diff changeset
26 # Clone PyHIST repository
c051e9688932 planemo upload for repository https://github.com/goeckslab/gleam.git commit 11356473f09dd54d86af28b74bd9ed097d07ca04
goeckslab
parents:
diff changeset
27 RUN git clone https://github.com/manuel-munoz-aguirre/PyHIST.git . && \
c051e9688932 planemo upload for repository https://github.com/goeckslab/gleam.git commit 11356473f09dd54d86af28b74bd9ed097d07ca04
goeckslab
parents:
diff changeset
28 git checkout master
c051e9688932 planemo upload for repository https://github.com/goeckslab/gleam.git commit 11356473f09dd54d86af28b74bd9ed097d07ca04
goeckslab
parents:
diff changeset
29
c051e9688932 planemo upload for repository https://github.com/goeckslab/gleam.git commit 11356473f09dd54d86af28b74bd9ed097d07ca04
goeckslab
parents:
diff changeset
30 # Create and activate virtual environment, then install Python packages
c051e9688932 planemo upload for repository https://github.com/goeckslab/gleam.git commit 11356473f09dd54d86af28b74bd9ed097d07ca04
goeckslab
parents:
diff changeset
31 RUN python3 -m venv /pyhist/venv && \
c051e9688932 planemo upload for repository https://github.com/goeckslab/gleam.git commit 11356473f09dd54d86af28b74bd9ed097d07ca04
goeckslab
parents:
diff changeset
32 /pyhist/venv/bin/pip install --upgrade pip && \
c051e9688932 planemo upload for repository https://github.com/goeckslab/gleam.git commit 11356473f09dd54d86af28b74bd9ed097d07ca04
goeckslab
parents:
diff changeset
33 /pyhist/venv/bin/pip install \
c051e9688932 planemo upload for repository https://github.com/goeckslab/gleam.git commit 11356473f09dd54d86af28b74bd9ed097d07ca04
goeckslab
parents:
diff changeset
34 pandas \
c051e9688932 planemo upload for repository https://github.com/goeckslab/gleam.git commit 11356473f09dd54d86af28b74bd9ed097d07ca04
goeckslab
parents:
diff changeset
35 opencv-python \
c051e9688932 planemo upload for repository https://github.com/goeckslab/gleam.git commit 11356473f09dd54d86af28b74bd9ed097d07ca04
goeckslab
parents:
diff changeset
36 numpy \
c051e9688932 planemo upload for repository https://github.com/goeckslab/gleam.git commit 11356473f09dd54d86af28b74bd9ed097d07ca04
goeckslab
parents:
diff changeset
37 Pillow \
c051e9688932 planemo upload for repository https://github.com/goeckslab/gleam.git commit 11356473f09dd54d86af28b74bd9ed097d07ca04
goeckslab
parents:
diff changeset
38 python-magic \
c051e9688932 planemo upload for repository https://github.com/goeckslab/gleam.git commit 11356473f09dd54d86af28b74bd9ed097d07ca04
goeckslab
parents:
diff changeset
39 openslide-python \
c051e9688932 planemo upload for repository https://github.com/goeckslab/gleam.git commit 11356473f09dd54d86af28b74bd9ed097d07ca04
goeckslab
parents:
diff changeset
40 psutil
c051e9688932 planemo upload for repository https://github.com/goeckslab/gleam.git commit 11356473f09dd54d86af28b74bd9ed097d07ca04
goeckslab
parents:
diff changeset
41
c051e9688932 planemo upload for repository https://github.com/goeckslab/gleam.git commit 11356473f09dd54d86af28b74bd9ed097d07ca04
goeckslab
parents:
diff changeset
42 # Compile segmentation algorithm
c051e9688932 planemo upload for repository https://github.com/goeckslab/gleam.git commit 11356473f09dd54d86af28b74bd9ed097d07ca04
goeckslab
parents:
diff changeset
43 RUN cd src/graph_segmentation/ && \
c051e9688932 planemo upload for repository https://github.com/goeckslab/gleam.git commit 11356473f09dd54d86af28b74bd9ed097d07ca04
goeckslab
parents:
diff changeset
44 make && \
c051e9688932 planemo upload for repository https://github.com/goeckslab/gleam.git commit 11356473f09dd54d86af28b74bd9ed097d07ca04
goeckslab
parents:
diff changeset
45 chmod 755 segment
c051e9688932 planemo upload for repository https://github.com/goeckslab/gleam.git commit 11356473f09dd54d86af28b74bd9ed097d07ca04
goeckslab
parents:
diff changeset
46
c051e9688932 planemo upload for repository https://github.com/goeckslab/gleam.git commit 11356473f09dd54d86af28b74bd9ed097d07ca04
goeckslab
parents:
diff changeset
47 # Add venv binaries to PATH
c051e9688932 planemo upload for repository https://github.com/goeckslab/gleam.git commit 11356473f09dd54d86af28b74bd9ed097d07ca04
goeckslab
parents:
diff changeset
48 ENV PATH="/pyhist/venv/bin:$PATH"
c051e9688932 planemo upload for repository https://github.com/goeckslab/gleam.git commit 11356473f09dd54d86af28b74bd9ed097d07ca04
goeckslab
parents:
diff changeset
49
c051e9688932 planemo upload for repository https://github.com/goeckslab/gleam.git commit 11356473f09dd54d86af28b74bd9ed097d07ca04
goeckslab
parents:
diff changeset
50 # Make pyhist.py globally executable and accessible
c051e9688932 planemo upload for repository https://github.com/goeckslab/gleam.git commit 11356473f09dd54d86af28b74bd9ed097d07ca04
goeckslab
parents:
diff changeset
51 RUN chmod +x /pyhist/pyhist.py && \
c051e9688932 planemo upload for repository https://github.com/goeckslab/gleam.git commit 11356473f09dd54d86af28b74bd9ed097d07ca04
goeckslab
parents:
diff changeset
52 ln -s /pyhist/pyhist.py /usr/local/bin/pyhist
c051e9688932 planemo upload for repository https://github.com/goeckslab/gleam.git commit 11356473f09dd54d86af28b74bd9ed097d07ca04
goeckslab
parents:
diff changeset
53
c051e9688932 planemo upload for repository https://github.com/goeckslab/gleam.git commit 11356473f09dd54d86af28b74bd9ed097d07ca04
goeckslab
parents:
diff changeset
54 # Ensure src directory is in PYTHONPATH for module imports
c051e9688932 planemo upload for repository https://github.com/goeckslab/gleam.git commit 11356473f09dd54d86af28b74bd9ed097d07ca04
goeckslab
parents:
diff changeset
55 ENV PYTHONPATH="/pyhist:$PYTHONPATH"
c051e9688932 planemo upload for repository https://github.com/goeckslab/gleam.git commit 11356473f09dd54d86af28b74bd9ed097d07ca04
goeckslab
parents:
diff changeset
56
c051e9688932 planemo upload for repository https://github.com/goeckslab/gleam.git commit 11356473f09dd54d86af28b74bd9ed097d07ca04
goeckslab
parents:
diff changeset
57 # Set default command (optional, for debugging)
c051e9688932 planemo upload for repository https://github.com/goeckslab/gleam.git commit 11356473f09dd54d86af28b74bd9ed097d07ca04
goeckslab
parents:
diff changeset
58 CMD ["/bin/bash"]