-
Notifications
You must be signed in to change notification settings - Fork 4
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 #58 from alneberg/johannes_test
Adapt Dockerfile for arm64 and some requirements changes
- Loading branch information
Showing
4 changed files
with
48 additions
and
14 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 |
---|---|---|
|
@@ -5,12 +5,47 @@ LABEL author="Remi-Andre Olsen" \ | |
maintainer="[email protected]" | ||
|
||
USER root | ||
|
||
# Check for arm64 architecture to install minimap2 | ||
ARG TARGETARCH | ||
RUN if [ "$TARGETARCH" = "arm64" ]; then \ | ||
# Install compliation tools for minimap2 | ||
apt-get update;\ | ||
apt-get install -y curl build-essential libz-dev;\ | ||
fi | ||
|
||
ENV MINIMAP_VERSION=2.26 | ||
|
||
RUN if [ "$TARGETARCH" = "arm64" ]; then \ | ||
# Download minimap2 | ||
curl -L https://github.com/lh3/minimap2/archive/refs/tags/v${MINIMAP_VERSION}.tar.gz | tar -zxvf - ;\ | ||
fi | ||
|
||
RUN if [ "$TARGETARCH" = "arm64" ]; then \ | ||
# Compile minimap2 | ||
cd minimap2-${MINIMAP_VERSION};\ | ||
make arm_neon=1 aarch64=1; \ | ||
# Add to path | ||
mv minimap2 /usr/local/bin/;\ | ||
fi | ||
|
||
COPY --chown=$MAMBA_USER:$MAMBA_USER environment.yml / | ||
RUN micromamba env create -n anglerfish && micromamba install -y -n anglerfish -f /environment.yml && micromamba clean --all --yes | ||
ENV PATH /opt/conda/envs/anglerfish/bin:$PATH | ||
COPY --chown=$MAMBA_USER:$MAMBA_USER requirements.txt / | ||
|
||
RUN if [ "$TARGETARCH" = "arm64" ]; then \ | ||
grep -v 'minimap2' /environment.yml > /environment.tmp.yml ;\ | ||
else \ | ||
cp /environment.yml /environment.tmp.yml ;\ | ||
fi ;\ | ||
chown $MAMBA_USER:$MAMBA_USER /environment.tmp.yml | ||
|
||
# Add source files to the container | ||
ADD . /usr/src/anglerfish | ||
WORKDIR /usr/src/anglerfish | ||
RUN eval "$(micromamba shell hook --shell bash)" && micromamba activate anglerfish && python -m pip install .[dev] | ||
|
||
# Activate the environment | ||
ARG MAMBA_DOCKERFILE_ACTIVATE=1 | ||
RUN micromamba install -y -f /environment.tmp.yml && micromamba clean --all --yes | ||
|
||
RUN eval "$(micromamba shell hook --shell bash)" && python -m pip install .[dev] | ||
USER $MAMBA_USER |
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
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,4 @@ | ||
numpy==1.26.3 | ||
biopython==1.83 | ||
levenshtein==0.23.0 | ||
pyyaml==6.0.1 |
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