-
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.
- Loading branch information
1 parent
5b7a01a
commit 5df4c95
Showing
1 changed file
with
51 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,51 @@ | ||
ARG MINIFORGE_VERSION=22.9.0-2 | ||
ARG UBUNTU_VERSION=20.04 | ||
|
||
FROM condaforge/mambaforge:${MINIFORGE_VERSION} AS builder | ||
|
||
# Use conda to install tools and dependencies into /usr/local | ||
ARG PYTHON_VERSION=3.10 | ||
ARG VCFTOOLS_VERSION=0.1.16 | ||
RUN mamba create -qy -p /usr/local \ | ||
-c bioconda \ | ||
-c conda-forge \ | ||
python==${PYTHON_VERSION} \ | ||
vcftools==${VCFTOOLS_VERSION} \ | ||
perl-vcftools-vcf==${VCFTOOLS_VERSION} \ | ||
tabix \ | ||
pip | ||
|
||
# Deploy the target tools into a base image | ||
FROM ubuntu:${UBUNTU_VERSION} AS final | ||
COPY --from=builder /usr/local /usr/local | ||
|
||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
libmagic1 && \ | ||
rm -rf /var/lib/apt/lists/* && \ | ||
rm -rf /tmp/downloaded_packages/ /tmp/*.rds | ||
|
||
# create directory for python script | ||
RUN mkdir -p /tool/validate/ | ||
|
||
# install all requirements, including validate module | ||
# COPY requirements.txt /tool | ||
COPY setup.py /tool | ||
COPY setup.cfg /tool | ||
COPY pyproject.toml /tool | ||
COPY /pipeval /tool/pipeval | ||
WORKDIR /tool | ||
RUN pip install build && \ | ||
pip install . | ||
|
||
# add tool folder to path | ||
ENV PYTHONPATH "${PYTHONPATH}:/tool/" | ||
|
||
# Add a new user/group called bldocker | ||
RUN groupadd -g 500001 bldocker && \ | ||
useradd -r -u 500001 -g bldocker bldocker | ||
|
||
# Change the default user to bldocker from root | ||
USER bldocker | ||
|
||
LABEL maintainer="Yash Patel <[email protected]>" \ | ||
org.opencontainers.image.source=https://github.com/uclahs-cds/package-PipeVal |