forked from templateflow/datalad-docker
-
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.
- Loading branch information
Showing
3 changed files
with
18 additions
and
54 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
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,61 +1,15 @@ | ||
# MIT License | ||
# | ||
# Copyright (c) 2021 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 | ||
# in the Software without restriction, including without limitation the rights | ||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
# copies of the Software, and to permit persons to whom the Software is | ||
# furnished to do so, subject to the following conditions: | ||
# | ||
# The above copyright notice and this permission notice shall be included in all | ||
# copies or substantial portions of the Software. | ||
# | ||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
# 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 | ||
|
||
ENV LANG="C.UTF-8" \ | ||
LC_ALL="C.UTF-8" | ||
FROM python:3.8-slim | ||
|
||
# Prepare environment | ||
RUN apt-get update && \ | ||
apt-get install -y --no-install-recommends \ | ||
apt-utils \ | ||
ca-certificates \ | ||
curl \ | ||
netbase \ | ||
vim && \ | ||
curl bzip2 git && \ | ||
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* | ||
|
||
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 | ||
ENV GIT_ANNEX_PACKAGE=git-annex-10.20220505-nodep_h1234567_0.tar.bz2 | ||
|
||
RUN pip install datalad-osf | ||
RUN cd /usr/ && \ | ||
curl -sSL https://anaconda.org/conda-forge/git-annex/10.20220505/download/linux-64/$GIT_ANNEX_PACKAGE | \ | ||
tar -xj | ||
|
||
RUN pip install datalad pytest ssh_agent_setup |
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,10 @@ | ||
FROM python:3.8-alpine as builder | ||
|
||
RUN apk update && apk add --no-cache curl bzip2 gcc libffi-dev musl-dev | ||
|
||
RUN pip install datalad pytest ssh_agent_setup | ||
|
||
FROM python:3.8-alpine | ||
COPY --from=builder /usr/local /usr/local | ||
|
||
RUN apk update && apk add --no-cache git openssh-client git-annex |