-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Save copy of Dockerfile in /github/workflows
- Loading branch information
Showing
1 changed file
with
48 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,52 @@ | ||
FROM python:3.11.6-alpine | ||
ARG HEATCLUSTER_VER="0.4.12" | ||
|
||
COPY .github /app/ | ||
COPY assets /app/ | ||
COPY test /app/ | ||
COPY HeatCluster.py LICENSE README.md /app/ | ||
FROM ubuntu:jammy as app | ||
USER root | ||
|
||
WORKDIR /app | ||
# re-instantiating for the app build layer if using ARG as a global variable above | ||
ARG HEATCLUSTER_VER | ||
|
||
RUN HeatCluster.py | ||
LABEL base.image="ubuntu:jammy" | ||
LABEL dockerfile.version="3" | ||
LABEL software="HeatCluster" | ||
LABEL software.version="${HEATCLUSTER_VER}" | ||
LABEL description="This software produces a heatmap for a SNP matrix" | ||
LABEL website="https://github.com/DrB-S/HeatCluster" | ||
LABEL license="https://github.com/DrB-S/HeatCluster/blob/master/LICENSE" | ||
LABEL name="heatcluster/${HEATCLUSTER_VER}" | ||
LABEL maintainer="Stephen Beckstrom-Sternberg" | ||
LABEL maintainer.email="[email protected]" | ||
|
||
CMD | ||
# Install Python and pip | ||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
apt-utils python3 python3-pip && \ | ||
apt-get clean && rm -rf /var/lib/apt/lists/* | ||
|
||
# Install Python dependencies | ||
RUN pip3 install pandas numpy pathlib seaborn matplotlib scipy | ||
|
||
# Set /data as working dir | ||
RUN mkdir /data | ||
WORKDIR /data | ||
|
||
RUN echo "installing heatcluster" && echo | ||
|
||
COPY . . | ||
|
||
RUN echo && echo && ls -latr /data && echo | ||
|
||
# 'ENV' instructions set environment variables that persist from the build into the resulting image | ||
# Use for e.g. $PATH and locale settings for compatibility with Singularity | ||
ENV PATH="/heatcluster-${HEATCLUSTER_VER}/bin:$PATH" \ | ||
LC_ALL=C | ||
|
||
FROM app as test | ||
|
||
# print help and version info | ||
# Mostly this ensures the tool of choice is in path and is executable | ||
RUN echo && echo "Show heatcluster help file and program version number: " && echo && \ | ||
python3 HeatCluster.py --help && \ | ||
python3 HeatCluster.py --version | ||
|
||
RUN echo && echo "Run a test matrix thru the program" && \ | ||
python3 HeatCluster.py -i test/snp-dists.txt && echo |