Skip to content

Commit

Permalink
Merge pull request #1 from courtois-neuromod/alpine
Browse files Browse the repository at this point in the history
make alpine version for performance
  • Loading branch information
effigies authored May 27, 2024
2 parents 5ea5d5d + d260fc0 commit 4c30507
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 37 deletions.
43 changes: 7 additions & 36 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# MIT License
#
# Copyright (c) 2021 The NiPreps Developers
# Copyright (c) The NiPreps Developers
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
Expand All @@ -20,42 +20,13 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

# Use Ubuntu 20.04 LTS
FROM ubuntu:focal-20210416
FROM python:3.11-alpine as builder

ENV LANG="C.UTF-8" \
LC_ALL="C.UTF-8"
RUN apk update && apk add --no-cache curl bzip2 gcc libffi-dev musl-dev

# Prepare environment
RUN apt-get update && \
apt-get install -y --no-install-recommends \
apt-utils \
ca-certificates \
curl \
netbase \
vim && \
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN python -m pip install --no-cache-dir datalad pytest ssh_agent_setup

ENV EDITOR=/usr/bin/vim

# Installing and setting up miniconda
RUN curl -sSLO https://repo.continuum.io/miniconda/Miniconda3-py38_4.10.3-Linux-x86_64.sh && \
bash Miniconda3-py38_4.10.3-Linux-x86_64.sh -b -p /opt/miniconda && \
rm Miniconda3-py38_4.10.3-Linux-x86_64.sh

# Set CPATH for packages relying on compiled libs (e.g. indexed_gzip)
ENV PATH="/opt/miniconda/bin:$PATH" \
CPATH="/opt/miniconda/include:$CPATH" \
PYTHONNOUSERSITE=1

RUN conda install -y -c conda-forge -c anaconda \
datalad \
git-annex \
hub \
jq \
osfclient && \
conda clean -y --all && sync && \
rm -rf ~/.conda ~/.cache/pip/*; sync

RUN pip install datalad-osf
FROM python:3.11-alpine
COPY --from=builder /usr/local /usr/local

RUN apk update && apk add --no-cache git openssh-client git-annex
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2021 TemplateFlow
Copyright (c) The NiPreps Developers

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down

0 comments on commit 4c30507

Please sign in to comment.