-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #151 from getwilds/shapemapper
Adding Shapemapper Docker Image
- Loading branch information
Showing
2 changed files
with
104 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# Use Ubuntu as the base image | ||
FROM ubuntu:22.04 | ||
|
||
# Adding labels for the GitHub Container Registry | ||
LABEL org.opencontainers.image.title="shapemapper" \ | ||
org.opencontainers.image.description="Container image for the use of ShapeMapper in FH DaSL's WILDS" \ | ||
org.opencontainers.image.version="2.3" \ | ||
org.opencontainers.image.authors="wilds@fredhutch.org" \ | ||
org.opencontainers.image.url=https://hutchdatascience.org/ \ | ||
org.opencontainers.image.documentation=https://getwilds.org/ \ | ||
org.opencontainers.image.source=https://github.com/getwilds/wilds-docker-library \ | ||
org.opencontainers.image.licenses=MIT | ||
|
||
# Prevent interactive prompts during package installation | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
# Set shell options | ||
SHELL ["/bin/bash", "-o", "pipefail", "-c"] | ||
|
||
# Update system and install dependencies with dynamic version fetching | ||
RUN apt-get update && \ | ||
apt-get upgrade -y && \ | ||
# Store current versions in variables | ||
WGET_VERSION=$(apt-cache policy wget | grep Candidate | awk '{print $2}') && \ | ||
TAR_VERSION=$(apt-cache policy tar | grep Candidate | awk '{print $2}') && \ | ||
PYTHON3_VERSION=$(apt-cache policy python3 | grep Candidate | awk '{print $2}') && \ | ||
GNUTLS_VERSION=$(apt-cache policy gnutls-bin | grep Candidate | awk '{print $2}') && \ | ||
CA_CERTS_VERSION=$(apt-cache policy ca-certificates | grep Candidate | awk '{print $2}') && \ | ||
# Install packages with specific versions | ||
apt-get install -y --no-install-recommends \ | ||
wget="${WGET_VERSION}" \ | ||
tar="${TAR_VERSION}" \ | ||
python3="${PYTHON3_VERSION}" \ | ||
gnutls-bin="${GNUTLS_VERSION}" \ | ||
ca-certificates="${CA_CERTS_VERSION}" \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Download and install ShapeMapper from release tarball | ||
RUN wget -q https://github.com/Weeks-UNC/shapemapper2/releases/download/v2.3/shapemapper2-2.3.tar.gz \ | ||
&& tar -xzf shapemapper2-2.3.tar.gz \ | ||
&& rm shapemapper2-2.3.tar.gz \ | ||
&& mv shapemapper2-2.3 /opt/shapemapper | ||
|
||
# Add ShapeMapper to PATH | ||
ENV PATH="/opt/shapemapper:${PATH}" | ||
|
||
# Create working directory | ||
WORKDIR /data | ||
|
||
# Default command (can be overridden) | ||
CMD ["shapemapper", "--help"] |
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 |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# Use Ubuntu as the base image | ||
FROM ubuntu:22.04 | ||
|
||
# Adding labels for the GitHub Container Registry | ||
LABEL org.opencontainers.image.title="shapemapper" \ | ||
org.opencontainers.image.description="Container image for the use of ShapeMapper in FH DaSL's WILDS" \ | ||
org.opencontainers.image.version="latest" \ | ||
org.opencontainers.image.authors="wilds@fredhutch.org" \ | ||
org.opencontainers.image.url=https://hutchdatascience.org/ \ | ||
org.opencontainers.image.documentation=https://getwilds.org/ \ | ||
org.opencontainers.image.source=https://github.com/getwilds/wilds-docker-library \ | ||
org.opencontainers.image.licenses=MIT | ||
|
||
# Prevent interactive prompts during package installation | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
# Set shell options | ||
SHELL ["/bin/bash", "-o", "pipefail", "-c"] | ||
|
||
# Update system and install dependencies with dynamic version fetching | ||
RUN apt-get update && \ | ||
apt-get upgrade -y && \ | ||
# Store current versions in variables | ||
WGET_VERSION=$(apt-cache policy wget | grep Candidate | awk '{print $2}') && \ | ||
TAR_VERSION=$(apt-cache policy tar | grep Candidate | awk '{print $2}') && \ | ||
PYTHON3_VERSION=$(apt-cache policy python3 | grep Candidate | awk '{print $2}') && \ | ||
GNUTLS_VERSION=$(apt-cache policy gnutls-bin | grep Candidate | awk '{print $2}') && \ | ||
CA_CERTS_VERSION=$(apt-cache policy ca-certificates | grep Candidate | awk '{print $2}') && \ | ||
# Install packages with specific versions | ||
apt-get install -y --no-install-recommends \ | ||
wget="${WGET_VERSION}" \ | ||
tar="${TAR_VERSION}" \ | ||
python3="${PYTHON3_VERSION}" \ | ||
gnutls-bin="${GNUTLS_VERSION}" \ | ||
ca-certificates="${CA_CERTS_VERSION}" \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Download and install ShapeMapper from release tarball | ||
RUN wget -q https://github.com/Weeks-UNC/shapemapper2/releases/download/v2.3/shapemapper2-2.3.tar.gz \ | ||
&& tar -xzf shapemapper2-2.3.tar.gz \ | ||
&& rm shapemapper2-2.3.tar.gz \ | ||
&& mv shapemapper2-2.3 /opt/shapemapper | ||
|
||
# Add ShapeMapper to PATH | ||
ENV PATH="/opt/shapemapper:${PATH}" | ||
|
||
# Create working directory | ||
WORKDIR /data | ||
|
||
# Default command (can be overridden) | ||
CMD ["shapemapper", "--help"] |