Skip to content

Commit

Permalink
adding deepcsr again to avoid rebase issues
Browse files Browse the repository at this point in the history
  • Loading branch information
hvgazula committed Aug 2, 2023
1 parent 53e744d commit 567e2fc
Show file tree
Hide file tree
Showing 279 changed files with 100,528 additions and 70 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- name: Build the Docker image
run: docker build -t hvgazula/topofit ./docker
run: docker build -t hvgazula/deepcsr ./docker

# Cleanup steps to free up disk space

Expand All @@ -35,4 +35,4 @@ jobs:
# if: github.event.pull_request.merged == true
run: |
docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }}
docker push hvgazula/topofit
docker push hvgazula/deepcsr
Binary file added docker/CBSI.tar.gz
Binary file not shown.
27 changes: 22 additions & 5 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
FROM nvidia/cuda:11.3.1-cudnn8-devel-ubuntu20.04 AS spython-base
FROM nvidia/cuda:11.3.1-cudnn8-devel-ubuntu20.04
ENV LANG=C.UTF-8
ENV LC_ALL=C.UTF-8
ENV PATH=/opt/miniconda3/bin:$PATH
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
ENV PYTHONIOENCODING=UTF-8
ENV PIPENV_VENV_IN_PROJECT=1
ENV JCC_JDK=/usr/lib/jvm/java-8-openjdk-amd64
RUN USE_CUDA=1
RUN CUDA_VERSION=11.3.1
RUN CUDNN_VERSION=8
Expand All @@ -15,12 +16,15 @@ RUN TORCH_CUDA_ARCH_LIST="7.0 7.5 8.0 8.6"
RUN rm -f /etc/apt/apt.conf.d/docker-clean; \
echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' \
> /etc/apt/apt.conf.d/keep-cache
RUN apt-get update && apt-get install -y --no-install-recommends \
RUN apt-get update && DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get -y install tzdata && apt-get install -y --no-install-recommends \
build-essential \
ca-certificates \
ccache \
curl \
git \
wget \
cmake \
openjdk-8-jdk \
libaio-dev && \
apt-get install -y --no-install-recommends llvm-10 lldb-10 llvm-10-dev libllvm10 llvm-10-runtime
RUN rm -rf /var/lib/apt/lists/*
Expand All @@ -32,10 +36,23 @@ chmod +x ~/miniconda.sh && \

WORKDIR /app
COPY environment.yml .
COPY CBSI.tar.gz .
RUN tar -xf CBSI.tar.gz
RUN mkdir niftyreg-build
ENV CMAKE_BUILD_TYPE=Release
WORKDIR /app/niftyreg-build
RUN cmake ../niftyreg-CBSI
RUN make
RUN make install
WORKDIR /app
RUN conda env create -f environment.yml
SHELL ["conda", "run", "-n", "topofit", "/bin/bash", "-c"]
RUN pip install torch-scatter -f https://data.pyg.org/whl/torch-1.11.0+cu113.html
SHELL ["conda", "run", "-n", "deepcsr", "/bin/bash", "-c"]
RUN git clone https://github.com/neuroneural/DeepCSR-fork.git
WORKDIR /app/DeepCSR-fork/docker/nighres
RUN git checkout tags/docker1
RUN ./build.sh
RUN python3 -m pip install .
RUN apt-get clean
RUN pip cache purge
RUN conda clean -a

ENTRYPOINT ["/bin/bash"]
123 changes: 60 additions & 63 deletions docker/environment.yml
Original file line number Diff line number Diff line change
@@ -1,88 +1,85 @@
name: topofit
name: deepcsr
channels:
- pytorch
- defaults
dependencies:
- _libgcc_mutex=0.1=main
- _openmp_mutex=5.1=1_gnu
- blas=1.0=mkl
- brotlipy=0.7.0=py37h27cfd23_1003
- bzip2=1.0.8=h7b6447c_0
- _openmp_mutex=4.5=1_gnu
- ca-certificates=2022.4.26=h06a4308_0
- certifi=2022.5.18.1=py37h06a4308_0
- cffi=1.15.0=py37hd667e15_1
- charset-normalizer=2.0.4=pyhd3eb1b0_0
- cryptography=37.0.1=py37h9ce1e76_0
- cudatoolkit=11.3.1=h2bc3f7f_2
- ffmpeg=4.3=hf484d3e_0
- freetype=2.11.0=h70c0345_0
- giflib=5.2.1=h7b6447c_0
- gmp=6.2.1=h2531618_2
- gnutls=3.6.15=he1e5248_0
- idna=3.3=pyhd3eb1b0_0
- intel-openmp=2021.4.0=h06a4308_3561
- jpeg=9e=h7f8727e_0
- lame=3.100=h7b6447c_0
- lcms2=2.12=h3be6417_0
- ld_impl_linux-64=2.38=h1181459_1
- certifi=2021.10.8=py37h06a4308_2
- ld_impl_linux-64=2.38=h1181459_0
- libffi=3.3=he6710b0_2
- libgcc-ng=11.2.0=h1234567_0
- libgomp=11.2.0=h1234567_0
- libiconv=1.16=h7f8727e_2
- libidn2=2.3.2=h7f8727e_0
- libpng=1.6.37=hbc83047_0
- libstdcxx-ng=11.2.0=h1234567_0
- libtasn1=4.16.0=h27cfd23_0
- libtiff=4.2.0=h2818925_1
- libunistring=0.9.10=h27cfd23_0
- libuv=1.40.0=h7b6447c_0
- libwebp=1.2.2=h55f646e_0
- libwebp-base=1.2.2=h7f8727e_0
- lz4-c=1.9.3=h295c915_1
- mkl=2021.4.0=h06a4308_640
- mkl-service=2.4.0=py37h7f8727e_0
- mkl_fft=1.3.1=py37hd3c417c_0
- mkl_random=1.2.2=py37h51133e4_0
- libgcc-ng=9.3.0=h5101ec6_17
- libgomp=9.3.0=h5101ec6_17
- libstdcxx-ng=9.3.0=hd4cf53a_17
- ncurses=6.3=h7f8727e_2
- nettle=3.7.3=hbbd107a_1
- numpy=1.21.5=py37he7a7128_2
- numpy-base=1.21.5=py37hf524024_2
- openh264=2.1.1=h4ff587b_0
- openssl=1.1.1o=h7f8727e_0
- pillow=9.0.1=py37h22f2fdc_0
- pip=21.2.2=py37h06a4308_0
- pycparser=2.21=pyhd3eb1b0_0
- pyopenssl=22.0.0=pyhd3eb1b0_0
- pysocks=1.7.1=py37_1
- python=3.7.13=h12debd9_0
- pytorch=1.11.0=py3.7_cuda11.3_cudnn8.2.0_0
- pytorch-mutex=1.0=cuda
- readline=8.1.2=h7f8727e_1
- requests=2.27.1=pyhd3eb1b0_0
- setuptools=61.2.0=py37h06a4308_0
- six=1.16.0=pyhd3eb1b0_1
- sqlite=3.38.3=hc218d9a_0
- tk=8.6.11=h1ccaba5_1
- torchaudio=0.11.0=py37_cu113
- torchvision=0.12.0=py37_cu113
- typing_extensions=4.1.1=pyh06a4308_0
- urllib3=1.26.9=py37h06a4308_0
- wheel=0.37.1=pyhd3eb1b0_0
- xz=5.2.5=h7f8727e_1
- zlib=1.2.12=h7f8727e_2
- zstd=1.5.2=ha4553b6_0
- pip:
- cython==0.29.30
- install==1.3.5
- absl-py==1.0.0
- antlr4-python3-runtime==4.8
- cachetools==5.1.0
- chart-studio==1.1.0
- cycler==0.11.0
- cython==0.29.29
- dataclasses==0.6
- fonttools==4.33.3
- future==0.18.2
- google-auth==2.6.6
- google-auth-oauthlib==0.4.6
- grpcio==1.46.1
- hydra-core==1.1.2
- imageio==2.19.2
- importlib-metadata==4.11.3
- importlib-resources==5.2.3
- jcc==3.12
- joblib==1.1.0
- numpy-stl==2.17.1
- kiwisolver==1.4.3
- markdown==3.3.7
- matplotlib==3.5.2
- networkx==2.6.3
- oauthlib==3.2.0
- omegaconf==2.1.2
- packaging==21.3
- patsy==0.5.2
- pillow==9.1.0
- plotly==5.9.0
- protobuf==3.20.1
- psutil==5.9.1
- pyasn1==0.4.8
- pyasn1-modules==0.2.8
- pyparsing==3.0.9
- python-dateutil==2.8.2
- python-utils==3.3.3
- pywavelets==1.3.0
- pyyaml==6.0
- requests-oauthlib==1.3.1
- retrying==1.3.3
- rsa==4.8
- rtree==1.0.0
- scikit-image==0.19.2
- scikit-learn==1.0.2
- scipy==1.7.3
- stl==0.0.3
- surfa==0.0.8
- six==1.16.0
- statsmodels==0.13.2
- tenacity==8.0.1
- tensorboard==2.9.0
- tensorboard-data-server==0.6.1
- tensorboard-plugin-wit==1.8.1
- threadpoolctl==3.1.0
prefix: /data/users2/washbee/anaconda3/envs/topofit
- tifffile==2021.11.2
- torch==1.7.0
- torchaudio==0.7.0
- torchvision==0.8.1
- trimesh==3.12.0
- typing-extensions==4.2.0
- webcolors==1.12
- werkzeug==2.1.2
- zipp==3.8.0
prefix: /data/users2/washbee/anaconda3/envs/deepcsr
24 changes: 24 additions & 0 deletions docker/nighres/.github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Build using conda environment
on: [push, pull_request]

jobs:
build-linux:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
with:
submodules: 'recursive'
- uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: nighres
environment-file: conda-nighres.yml
python-version: 3.9
auto-activate-base: false
- name: Run build process
shell: bash -l {0}
run: |
./build.sh
- name: Run pip install
run: |
python3 -m pip install .
38 changes: 38 additions & 0 deletions docker/nighres/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
__pycache__/
*.pyc
*~
*.zip
*.nt.bz2
*.tar.gz
*.tgz

env/
build/
cbstools-public/
imcn-imaging/
nighresjava/
develop-eggs/
dist/
downloads/
lib/
lib64/
parts/
sdist/
var/
eggs/
.eggs/
nighres.egg-info/
nighres.egg
.installed.cfg

.so
.jar

travis.log

doc/_build
doc/auto_examples
doc/gen_modules
doc/modules/generated

nighres_examples
35 changes: 35 additions & 0 deletions docker/nighres/.travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
matrix:
include:
- dist: bionic
language: java
jdk: openjdk11
before_install:
- export JCC_JDK=/usr/lib/jvm/java-11-openjdk-amd64
- sudo ln -s /usr/lib/jvm/java-11-openjdk-amd64/lib/server/libjvm.so /usr/lib/libjvm.so
- sudo ln -s /usr/lib/jvm/java-11-openjdk-amd64/lib/libjava.so /usr/lib/libjava.so
- sudo apt-get update
- sudo apt-get install python3.6
- sudo apt-get install python3-pip
- python3 -m pip install --upgrade --user setuptools
- python3 -m pip install --upgrade --user wheel
- python3 -m pip install --upgrade --user JCC
script: "travis/make_dist.sh"
# before_deploy:
# - python3 -m pip install --user twine
# - python3 -m pip install --user urllib3[secure]
# deploy:
# provider: pypi
# #server: https://test.pypi.org/legacy/
# user: "nighres"
# # using plain text password for testpypi, when switching to real pypi use encrypted (below)
# password:
# secure: "S010GtC13p8KB6lXiuPVDhCWk++PGCPGVmX9Kd7AL91c6KTSRnPAoWCGNPrgbPtKjapiuYd2f4D2iWuURdpI6OYUahzH/dlHJVDHJNZ3XFfE7eIylwnKxKGtlXxu0Tm+JLrN1gprU3bCWH9MbpWINgmccCXO+YJfDcsVzFd/ywJ2oo4n7fntAMOhj3djRlkXh57pPLM3LKQeHSjjx8RMYTwKCVUAMB76iUnfcow7Lcmo73KghD/71uJEr8AA0RDB0uC8x9DAR/RL4g8JL1PR0ocOJ9iHsBus1jHxsxw+ISVP6iCiJNqKUKV3JbZ7PJ997YxpmInTBJNnAzGkne7dy77f10m3RMHKjsFimg0yQouPGDi8hBk2/0i2piDErq6lf2x4rTvWsIBhKroaNUjvltFl2N6OCGMzN1xsnYtzrUWc5DuY9XerEVFkPIpd+i/ojyBqU+ssj5fwMRNoACWxFZ/Hxf1YwEpU9OgBXfiU3SK4VwGPf2s2zXbqTT+ogiNB+EYhdrAaPaFgjLkfoLjLxpSnmE2WTJphmLFCx9ZRbW5tS++K+iJ5Cyc+pTjIfzb7KLLPAvhD99VEikutp8X91pRT1LTUWV921ymD0BKtF4K2eUJZSYiVO4ct9sl2GQIi0v1rRfDWxN+9pUnCOP1cPHnXTe0qGH26ulf48lQejm8="
# skip_cleanup: true
# on:
# tags: true
# branch: master
# condition: $TRAVIS_PYTHON_VERSION = "2.7" once we run travis against
# multiple python versions, this ensures that the package will be deployed only once

notifications:
email: false
58 changes: 58 additions & 0 deletions docker/nighres/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
FROM ubuntu:16.04

RUN apt-get update && \
apt-get -y install sudo && \
sudo apt-get update -qq && \
apt-get install -y python3 \
python3-pip \
python3-dev \
build-essential \
software-properties-common \
openjdk-8-jdk \
git \
wget && \
sudo add-apt-repository ppa:openjdk-r/ppa && \
apt-get update -qq && \
apt-get install -y openjdk-8-jdk

RUN ln -svT "/usr/lib/jvm/java-8-openjdk-$(dpkg --print-architecture)" /docker-java-home
ENV JAVA_HOME=/docker-java-home \
JCC_JDK=/docker-java-home

RUN apt-get install libffi-dev && \
python3 -m pip install --upgrade "pip < 21.0" \
wheel \
JCC \
urllib3 && \
python3 -m pip install jupyter \
nilearn \
sklearn \
nose \
matplotlib \
scipy \
psutil

RUN useradd --no-user-group --create-home --shell /bin/bash neuro && \
mkdir /home/neuro/nighres
COPY build.sh cbstools-lib-files.sh setup.py MANIFEST.in README.rst LICENSE imcntk-lib-files.sh /home/neuro/nighres/
COPY nighres /home/neuro/nighres/nighres

RUN cd /home/neuro/nighres && \
./build.sh && \
cd /home/neuro/nighres && python3 -m pip install . && \
mkdir /home/neuro/notebooks && \
chown -R neuro /home/neuro

COPY docker/jupyter_notebook_config.py /etc/jupyter/

EXPOSE 8888

ENV TINI_VERSION v0.6.0
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /usr/bin/tini
RUN chmod +x /usr/bin/tini
ENTRYPOINT ["/usr/bin/tini", "--"]

EXPOSE 8888
CMD ["jupyter", "notebook", "--port=8888", "--no-browser", "--ip=0.0.0.0"]

USER neuro
Loading

0 comments on commit 567e2fc

Please sign in to comment.