Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
57 changes: 57 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
FROM ghcr.io/prefix-dev/pixi:0.53.0 AS build

USER root

# Prepare environment
RUN apt-get update && \
apt-get install -y --no-install-recommends \
ca-certificates \
git && \
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

# Run post-link scripts during install, but use global to keep out of source tree
RUN pixi config set --global run-post-link-scripts insecure

# Install dependencies before the package itself to leverage caching
RUN mkdir /app
COPY pixi.lock pixi.toml /app
WORKDIR /app

RUN pixi install -e default --frozen
RUN pixi shell-hook -e default --as-is | grep -v PATH > /shell-hook.sh


FROM jupyter/base-notebook:x86_64-lab-4.0.7

USER root

# Prepare environment
RUN apt-get update && \
apt-get install -y --no-install-recommends \
curl \
dvipng \
texlive-fonts-recommended \
texlive-fonts-extra \
texlive-latex-extra \
cm-super && \
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

COPY --link --from=build /app/.pixi/envs/default /app/.pixi/envs/default
COPY --link --from=build /shell-hook.sh /shell-hook.sh
RUN cat /shell-hook.sh >> $HOME/.bashrc
ENV PATH="/app/.pixi/envs/default/bin:$PATH"

ENV NB_USER=jovyan \
NB_GROUP=users \
NB_UID=1000 \
NB_GID=100 \
HOME=/home/jovyan

RUN fix-permissions "/home/${NB_USER}"
# RUN chmod -R ${NB_USER}.${NB_GROUP} "/home/${NB_USER}"

USER ${NB_USER}

WORKDIR ${HOME}

COPY --chown=${NB_UID}:${NB_GID} . ${HOME}/nipreps-book
9 changes: 5 additions & 4 deletions binder/postBuild
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/bash
set -euxo pipefail

export ANTSPATH="$HOME/src/ants"
mkdir -p $ANTSPATH
curl -sSL "https://dl.dropbox.com/s/gwf51ykkk5bifyj/ants-Linux-centos6_x86_64-v2.3.4.tar.gz" | tar -xzC $ANTSPATH --strip-components 1
export PATH="$ANTSPATH:$PATH"
curl -fsSL https://pixi.sh/install.sh | bash
export PATH="$HOME/.pixi/bin:$PATH"

pixi install --locked
13 changes: 1 addition & 12 deletions binder/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1 @@
attr
dipy
git+https://github.com/nipreps/EddyMotionCorrection.git@main
jupytext
matplotlib
nibabel
nilearn
git+https://github.com/poldracklab/nitransforms.git@master
niworkflows >= 1.4.0rc5
numpy
pytest
requests
# Python dependencies are managed via Pixi. See binder/postBuild for setup steps.
46 changes: 0 additions & 46 deletions docker/Dockerfile

This file was deleted.

Loading