Skip to content
Draft
Show file tree
Hide file tree
Changes from 2 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
127 changes: 127 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
# Generated by: Neurodocker version 0.7.0+0.gdc97516.dirty
# Latest release: Neurodocker version 0.8.0
# Timestamp: 2022/04/11 12:55:39 UTC
#
# Thank you for using Neurodocker. If you discover any issues
# or ways to improve this software, please submit an issue or
# pull request on our GitHub repository:
#
# https://github.com/ReproNim/neurodocker
Comment on lines +1 to +9
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file is automatically generated via the Makefile


FROM python:3.9.12-slim-buster

USER root

ARG DEBIAN_FRONTEND="noninteractive"

ENV LANG="en_US.UTF-8" \
LC_ALL="en_US.UTF-8" \
ND_ENTRYPOINT="/neurodocker/startup.sh"
RUN export ND_ENTRYPOINT="/neurodocker/startup.sh" \
&& apt-get update -qq \
&& apt-get install -y -q --no-install-recommends \
apt-utils \
bzip2 \
ca-certificates \
curl \
locales \
unzip \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen \
&& dpkg-reconfigure --frontend=noninteractive locales \
&& update-locale LANG="en_US.UTF-8" \
&& chmod 777 /opt && chmod a+s /opt \
&& mkdir -p /neurodocker \
&& if [ ! -f "$ND_ENTRYPOINT" ]; then \
echo '#!/usr/bin/env bash' >> "$ND_ENTRYPOINT" \
&& echo 'set -e' >> "$ND_ENTRYPOINT" \
&& echo 'export USER="${USER:=`whoami`}"' >> "$ND_ENTRYPOINT" \
&& echo 'if [ -n "$1" ]; then "$@"; else /usr/bin/env bash; fi' >> "$ND_ENTRYPOINT"; \
fi \
&& chmod -R 777 /neurodocker && chmod a+s /neurodocker

ENTRYPOINT ["/neurodocker/startup.sh"]

RUN apt-get update -qq \
&& apt-get install -y -q --no-install-recommends \
build-essential \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

COPY ["glmsingle", "setup.py", "MANIFEST.in", "README.md", "requirements.txt", "/glmsingle/"]

WORKDIR /glmsingle

RUN pip install .

RUN pip install jupyterlab

EXPOSE 8888

RUN test "$(getent passwd neuro)" || useradd --no-user-group --create-home --shell /bin/bash neuro
USER neuro

WORKDIR /home/neuro

COPY ["examples", "/home/neuro/examples"]

RUN echo '{ \
\n "pkg_manager": "apt", \
\n "instructions": [ \
\n [ \
\n "base", \
\n "python:3.9.12-slim-buster" \
\n ], \
\n [ \
\n "install", \
\n [ \
\n "build-essential" \
\n ] \
\n ], \
\n [ \
\n "copy", \
\n [ \
\n "glmsingle", \
\n "setup.py", \
\n "MANIFEST.in", \
\n "README.md", \
\n "requirements.txt", \
\n "/glmsingle/" \
\n ] \
\n ], \
\n [ \
\n "workdir", \
\n "/glmsingle" \
\n ], \
\n [ \
\n "run", \
\n "pip install ." \
\n ], \
\n [ \
\n "run", \
\n "pip install jupyterlab" \
\n ], \
\n [ \
\n "expose", \
\n [ \
\n "8888" \
\n ] \
\n ], \
\n [ \
\n "user", \
\n "neuro" \
\n ], \
\n [ \
\n "workdir", \
\n "/home/neuro" \
\n ], \
\n [ \
\n "copy", \
\n [ \
\n "examples", \
\n "/home/neuro/examples" \
\n ] \
\n ] \
\n ] \
\n}' > /neurodocker/neurodocker_specs.json
31 changes: 30 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -113,4 +113,33 @@ coverage-python: ## check code coverage quickly with the default Python
install: clean ## install the package to the active Python's site-packages
python setup.py install

################################################################################
################################################################################

################################################################################
# DOCKER

.PHONY: Dockerfile
Dockerfile:
docker run --rm repronim/neurodocker:0.7.0 generate docker \
--base python:3.9.12-slim-buster \
--pkg-manager apt \
--install "build-essential" \
--copy glmsingle setup.py MANIFEST.in README.md requirements.txt /glmsingle/ \
--workdir /glmsingle \
--run "pip install ." \
--run "pip install jupyterlab" \
--expose 8888 \
--user neuro \
--workdir /home/neuro \
--copy examples /home/neuro/examples > Dockerfile
Comment on lines +123 to +134
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the neurodocker command to build the Dockerfile for GLMsingle


docker_build: Dockerfile
docker build . -t glmsingle:latest

docker_run: docker_build
mkdir -p $$PWD/tmp
docker run -it --rm \
--publish 8888:8888 \
--volume $$PWD/tmp:/home/neuro/tmp \
glmsingle:latest \
jupyter-lab --no-browser --ip 0.0.0.0
16 changes: 8 additions & 8 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
numpy
scipy
sklearn
matplotlib
tqdm
fracridge
nibabel
h5py
fracridge>=1.4.3
h5py>=3.1.0
matplotlib>=3.3.4
nibabel>=3.2.2
numpy>=1.17.0
scikit-learn>=0.23.2
scipy>=1.5.4
tqdm>=4.63.1
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,6 @@
packages=find_packages(),
include_package_data=True,
zip_safe=False,
install_requires=requires
install_requires=requires,
python_requires='>=3.6'
)