Skip to content

Commit 567e2fc

Browse files
committed
adding deepcsr again to avoid rebase issues
1 parent 53e744d commit 567e2fc

File tree

279 files changed

+100528
-70
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

279 files changed

+100528
-70
lines changed

.github/workflows/docker-image.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
2727
2828
- name: Build the Docker image
29-
run: docker build -t hvgazula/topofit ./docker
29+
run: docker build -t hvgazula/deepcsr ./docker
3030

3131
# Cleanup steps to free up disk space
3232

@@ -35,4 +35,4 @@ jobs:
3535
# if: github.event.pull_request.merged == true
3636
run: |
3737
docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }}
38-
docker push hvgazula/topofit
38+
docker push hvgazula/deepcsr

docker/CBSI.tar.gz

1.62 MB
Binary file not shown.

docker/Dockerfile

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
FROM nvidia/cuda:11.3.1-cudnn8-devel-ubuntu20.04 AS spython-base
1+
FROM nvidia/cuda:11.3.1-cudnn8-devel-ubuntu20.04
22
ENV LANG=C.UTF-8
33
ENV LC_ALL=C.UTF-8
44
ENV PATH=/opt/miniconda3/bin:$PATH
55
ENV PYTHONDONTWRITEBYTECODE=1
66
ENV PYTHONUNBUFFERED=1
77
ENV PYTHONIOENCODING=UTF-8
88
ENV PIPENV_VENV_IN_PROJECT=1
9+
ENV JCC_JDK=/usr/lib/jvm/java-8-openjdk-amd64
910
RUN USE_CUDA=1
1011
RUN CUDA_VERSION=11.3.1
1112
RUN CUDNN_VERSION=8
@@ -15,12 +16,15 @@ RUN TORCH_CUDA_ARCH_LIST="7.0 7.5 8.0 8.6"
1516
RUN rm -f /etc/apt/apt.conf.d/docker-clean; \
1617
echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' \
1718
> /etc/apt/apt.conf.d/keep-cache
18-
RUN apt-get update && apt-get install -y --no-install-recommends \
19+
RUN apt-get update && DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get -y install tzdata && apt-get install -y --no-install-recommends \
1920
build-essential \
2021
ca-certificates \
2122
ccache \
2223
curl \
2324
git \
25+
wget \
26+
cmake \
27+
openjdk-8-jdk \
2428
libaio-dev && \
2529
apt-get install -y --no-install-recommends llvm-10 lldb-10 llvm-10-dev libllvm10 llvm-10-runtime
2630
RUN rm -rf /var/lib/apt/lists/*
@@ -32,10 +36,23 @@ chmod +x ~/miniconda.sh && \
3236

3337
WORKDIR /app
3438
COPY environment.yml .
39+
COPY CBSI.tar.gz .
40+
RUN tar -xf CBSI.tar.gz
41+
RUN mkdir niftyreg-build
42+
ENV CMAKE_BUILD_TYPE=Release
43+
WORKDIR /app/niftyreg-build
44+
RUN cmake ../niftyreg-CBSI
45+
RUN make
46+
RUN make install
47+
WORKDIR /app
3548
RUN conda env create -f environment.yml
36-
SHELL ["conda", "run", "-n", "topofit", "/bin/bash", "-c"]
37-
RUN pip install torch-scatter -f https://data.pyg.org/whl/torch-1.11.0+cu113.html
49+
SHELL ["conda", "run", "-n", "deepcsr", "/bin/bash", "-c"]
50+
RUN git clone https://github.com/neuroneural/DeepCSR-fork.git
51+
WORKDIR /app/DeepCSR-fork/docker/nighres
52+
RUN git checkout tags/docker1
53+
RUN ./build.sh
54+
RUN python3 -m pip install .
3855
RUN apt-get clean
3956
RUN pip cache purge
4057
RUN conda clean -a
41-
58+
ENTRYPOINT ["/bin/bash"]

docker/environment.yml

Lines changed: 60 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,88 +1,85 @@
1-
name: topofit
1+
name: deepcsr
22
channels:
3-
- pytorch
43
- defaults
54
dependencies:
65
- _libgcc_mutex=0.1=main
7-
- _openmp_mutex=5.1=1_gnu
8-
- blas=1.0=mkl
9-
- brotlipy=0.7.0=py37h27cfd23_1003
10-
- bzip2=1.0.8=h7b6447c_0
6+
- _openmp_mutex=4.5=1_gnu
117
- ca-certificates=2022.4.26=h06a4308_0
12-
- certifi=2022.5.18.1=py37h06a4308_0
13-
- cffi=1.15.0=py37hd667e15_1
14-
- charset-normalizer=2.0.4=pyhd3eb1b0_0
15-
- cryptography=37.0.1=py37h9ce1e76_0
16-
- cudatoolkit=11.3.1=h2bc3f7f_2
17-
- ffmpeg=4.3=hf484d3e_0
18-
- freetype=2.11.0=h70c0345_0
19-
- giflib=5.2.1=h7b6447c_0
20-
- gmp=6.2.1=h2531618_2
21-
- gnutls=3.6.15=he1e5248_0
22-
- idna=3.3=pyhd3eb1b0_0
23-
- intel-openmp=2021.4.0=h06a4308_3561
24-
- jpeg=9e=h7f8727e_0
25-
- lame=3.100=h7b6447c_0
26-
- lcms2=2.12=h3be6417_0
27-
- ld_impl_linux-64=2.38=h1181459_1
8+
- certifi=2021.10.8=py37h06a4308_2
9+
- ld_impl_linux-64=2.38=h1181459_0
2810
- libffi=3.3=he6710b0_2
29-
- libgcc-ng=11.2.0=h1234567_0
30-
- libgomp=11.2.0=h1234567_0
31-
- libiconv=1.16=h7f8727e_2
32-
- libidn2=2.3.2=h7f8727e_0
33-
- libpng=1.6.37=hbc83047_0
34-
- libstdcxx-ng=11.2.0=h1234567_0
35-
- libtasn1=4.16.0=h27cfd23_0
36-
- libtiff=4.2.0=h2818925_1
37-
- libunistring=0.9.10=h27cfd23_0
38-
- libuv=1.40.0=h7b6447c_0
39-
- libwebp=1.2.2=h55f646e_0
40-
- libwebp-base=1.2.2=h7f8727e_0
41-
- lz4-c=1.9.3=h295c915_1
42-
- mkl=2021.4.0=h06a4308_640
43-
- mkl-service=2.4.0=py37h7f8727e_0
44-
- mkl_fft=1.3.1=py37hd3c417c_0
45-
- mkl_random=1.2.2=py37h51133e4_0
11+
- libgcc-ng=9.3.0=h5101ec6_17
12+
- libgomp=9.3.0=h5101ec6_17
13+
- libstdcxx-ng=9.3.0=hd4cf53a_17
4614
- ncurses=6.3=h7f8727e_2
47-
- nettle=3.7.3=hbbd107a_1
48-
- numpy=1.21.5=py37he7a7128_2
49-
- numpy-base=1.21.5=py37hf524024_2
50-
- openh264=2.1.1=h4ff587b_0
5115
- openssl=1.1.1o=h7f8727e_0
52-
- pillow=9.0.1=py37h22f2fdc_0
5316
- pip=21.2.2=py37h06a4308_0
54-
- pycparser=2.21=pyhd3eb1b0_0
55-
- pyopenssl=22.0.0=pyhd3eb1b0_0
56-
- pysocks=1.7.1=py37_1
5717
- python=3.7.13=h12debd9_0
58-
- pytorch=1.11.0=py3.7_cuda11.3_cudnn8.2.0_0
59-
- pytorch-mutex=1.0=cuda
6018
- readline=8.1.2=h7f8727e_1
61-
- requests=2.27.1=pyhd3eb1b0_0
6219
- setuptools=61.2.0=py37h06a4308_0
63-
- six=1.16.0=pyhd3eb1b0_1
6420
- sqlite=3.38.3=hc218d9a_0
6521
- tk=8.6.11=h1ccaba5_1
66-
- torchaudio=0.11.0=py37_cu113
67-
- torchvision=0.12.0=py37_cu113
68-
- typing_extensions=4.1.1=pyh06a4308_0
69-
- urllib3=1.26.9=py37h06a4308_0
7022
- wheel=0.37.1=pyhd3eb1b0_0
7123
- xz=5.2.5=h7f8727e_1
7224
- zlib=1.2.12=h7f8727e_2
73-
- zstd=1.5.2=ha4553b6_0
7425
- pip:
75-
- cython==0.29.30
76-
- install==1.3.5
26+
- absl-py==1.0.0
27+
- antlr4-python3-runtime==4.8
28+
- cachetools==5.1.0
29+
- chart-studio==1.1.0
30+
- cycler==0.11.0
31+
- cython==0.29.29
32+
- dataclasses==0.6
33+
- fonttools==4.33.3
34+
- future==0.18.2
35+
- google-auth==2.6.6
36+
- google-auth-oauthlib==0.4.6
37+
- grpcio==1.46.1
38+
- hydra-core==1.1.2
39+
- imageio==2.19.2
40+
- importlib-metadata==4.11.3
41+
- importlib-resources==5.2.3
42+
- jcc==3.12
7743
- joblib==1.1.0
78-
- numpy-stl==2.17.1
44+
- kiwisolver==1.4.3
45+
- markdown==3.3.7
46+
- matplotlib==3.5.2
47+
- networkx==2.6.3
48+
- oauthlib==3.2.0
49+
- omegaconf==2.1.2
7950
- packaging==21.3
51+
- patsy==0.5.2
52+
- pillow==9.1.0
53+
- plotly==5.9.0
54+
- protobuf==3.20.1
55+
- psutil==5.9.1
56+
- pyasn1==0.4.8
57+
- pyasn1-modules==0.2.8
8058
- pyparsing==3.0.9
8159
- python-dateutil==2.8.2
82-
- python-utils==3.3.3
60+
- pywavelets==1.3.0
61+
- pyyaml==6.0
62+
- requests-oauthlib==1.3.1
63+
- retrying==1.3.3
64+
- rsa==4.8
65+
- rtree==1.0.0
66+
- scikit-image==0.19.2
8367
- scikit-learn==1.0.2
8468
- scipy==1.7.3
85-
- stl==0.0.3
86-
- surfa==0.0.8
69+
- six==1.16.0
70+
- statsmodels==0.13.2
71+
- tenacity==8.0.1
72+
- tensorboard==2.9.0
73+
- tensorboard-data-server==0.6.1
74+
- tensorboard-plugin-wit==1.8.1
8775
- threadpoolctl==3.1.0
88-
prefix: /data/users2/washbee/anaconda3/envs/topofit
76+
- tifffile==2021.11.2
77+
- torch==1.7.0
78+
- torchaudio==0.7.0
79+
- torchvision==0.8.1
80+
- trimesh==3.12.0
81+
- typing-extensions==4.2.0
82+
- webcolors==1.12
83+
- werkzeug==2.1.2
84+
- zipp==3.8.0
85+
prefix: /data/users2/washbee/anaconda3/envs/deepcsr
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Build using conda environment
2+
on: [push, pull_request]
3+
4+
jobs:
5+
build-linux:
6+
runs-on: ubuntu-latest
7+
8+
steps:
9+
- uses: actions/checkout@v2
10+
with:
11+
submodules: 'recursive'
12+
- uses: conda-incubator/setup-miniconda@v2
13+
with:
14+
activate-environment: nighres
15+
environment-file: conda-nighres.yml
16+
python-version: 3.9
17+
auto-activate-base: false
18+
- name: Run build process
19+
shell: bash -l {0}
20+
run: |
21+
./build.sh
22+
- name: Run pip install
23+
run: |
24+
python3 -m pip install .

docker/nighres/.gitignore

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
__pycache__/
2+
*.pyc
3+
*~
4+
*.zip
5+
*.nt.bz2
6+
*.tar.gz
7+
*.tgz
8+
9+
env/
10+
build/
11+
cbstools-public/
12+
imcn-imaging/
13+
nighresjava/
14+
develop-eggs/
15+
dist/
16+
downloads/
17+
lib/
18+
lib64/
19+
parts/
20+
sdist/
21+
var/
22+
eggs/
23+
.eggs/
24+
nighres.egg-info/
25+
nighres.egg
26+
.installed.cfg
27+
28+
.so
29+
.jar
30+
31+
travis.log
32+
33+
doc/_build
34+
doc/auto_examples
35+
doc/gen_modules
36+
doc/modules/generated
37+
38+
nighres_examples

docker/nighres/.travis.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
matrix:
2+
include:
3+
- dist: bionic
4+
language: java
5+
jdk: openjdk11
6+
before_install:
7+
- export JCC_JDK=/usr/lib/jvm/java-11-openjdk-amd64
8+
- sudo ln -s /usr/lib/jvm/java-11-openjdk-amd64/lib/server/libjvm.so /usr/lib/libjvm.so
9+
- sudo ln -s /usr/lib/jvm/java-11-openjdk-amd64/lib/libjava.so /usr/lib/libjava.so
10+
- sudo apt-get update
11+
- sudo apt-get install python3.6
12+
- sudo apt-get install python3-pip
13+
- python3 -m pip install --upgrade --user setuptools
14+
- python3 -m pip install --upgrade --user wheel
15+
- python3 -m pip install --upgrade --user JCC
16+
script: "travis/make_dist.sh"
17+
# before_deploy:
18+
# - python3 -m pip install --user twine
19+
# - python3 -m pip install --user urllib3[secure]
20+
# deploy:
21+
# provider: pypi
22+
# #server: https://test.pypi.org/legacy/
23+
# user: "nighres"
24+
# # using plain text password for testpypi, when switching to real pypi use encrypted (below)
25+
# password:
26+
# secure: "S010GtC13p8KB6lXiuPVDhCWk++PGCPGVmX9Kd7AL91c6KTSRnPAoWCGNPrgbPtKjapiuYd2f4D2iWuURdpI6OYUahzH/dlHJVDHJNZ3XFfE7eIylwnKxKGtlXxu0Tm+JLrN1gprU3bCWH9MbpWINgmccCXO+YJfDcsVzFd/ywJ2oo4n7fntAMOhj3djRlkXh57pPLM3LKQeHSjjx8RMYTwKCVUAMB76iUnfcow7Lcmo73KghD/71uJEr8AA0RDB0uC8x9DAR/RL4g8JL1PR0ocOJ9iHsBus1jHxsxw+ISVP6iCiJNqKUKV3JbZ7PJ997YxpmInTBJNnAzGkne7dy77f10m3RMHKjsFimg0yQouPGDi8hBk2/0i2piDErq6lf2x4rTvWsIBhKroaNUjvltFl2N6OCGMzN1xsnYtzrUWc5DuY9XerEVFkPIpd+i/ojyBqU+ssj5fwMRNoACWxFZ/Hxf1YwEpU9OgBXfiU3SK4VwGPf2s2zXbqTT+ogiNB+EYhdrAaPaFgjLkfoLjLxpSnmE2WTJphmLFCx9ZRbW5tS++K+iJ5Cyc+pTjIfzb7KLLPAvhD99VEikutp8X91pRT1LTUWV921ymD0BKtF4K2eUJZSYiVO4ct9sl2GQIi0v1rRfDWxN+9pUnCOP1cPHnXTe0qGH26ulf48lQejm8="
27+
# skip_cleanup: true
28+
# on:
29+
# tags: true
30+
# branch: master
31+
# condition: $TRAVIS_PYTHON_VERSION = "2.7" once we run travis against
32+
# multiple python versions, this ensures that the package will be deployed only once
33+
34+
notifications:
35+
email: false

docker/nighres/Dockerfile

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
FROM ubuntu:16.04
2+
3+
RUN apt-get update && \
4+
apt-get -y install sudo && \
5+
sudo apt-get update -qq && \
6+
apt-get install -y python3 \
7+
python3-pip \
8+
python3-dev \
9+
build-essential \
10+
software-properties-common \
11+
openjdk-8-jdk \
12+
git \
13+
wget && \
14+
sudo add-apt-repository ppa:openjdk-r/ppa && \
15+
apt-get update -qq && \
16+
apt-get install -y openjdk-8-jdk
17+
18+
RUN ln -svT "/usr/lib/jvm/java-8-openjdk-$(dpkg --print-architecture)" /docker-java-home
19+
ENV JAVA_HOME=/docker-java-home \
20+
JCC_JDK=/docker-java-home
21+
22+
RUN apt-get install libffi-dev && \
23+
python3 -m pip install --upgrade "pip < 21.0" \
24+
wheel \
25+
JCC \
26+
urllib3 && \
27+
python3 -m pip install jupyter \
28+
nilearn \
29+
sklearn \
30+
nose \
31+
matplotlib \
32+
scipy \
33+
psutil
34+
35+
RUN useradd --no-user-group --create-home --shell /bin/bash neuro && \
36+
mkdir /home/neuro/nighres
37+
COPY build.sh cbstools-lib-files.sh setup.py MANIFEST.in README.rst LICENSE imcntk-lib-files.sh /home/neuro/nighres/
38+
COPY nighres /home/neuro/nighres/nighres
39+
40+
RUN cd /home/neuro/nighres && \
41+
./build.sh && \
42+
cd /home/neuro/nighres && python3 -m pip install . && \
43+
mkdir /home/neuro/notebooks && \
44+
chown -R neuro /home/neuro
45+
46+
COPY docker/jupyter_notebook_config.py /etc/jupyter/
47+
48+
EXPOSE 8888
49+
50+
ENV TINI_VERSION v0.6.0
51+
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /usr/bin/tini
52+
RUN chmod +x /usr/bin/tini
53+
ENTRYPOINT ["/usr/bin/tini", "--"]
54+
55+
EXPOSE 8888
56+
CMD ["jupyter", "notebook", "--port=8888", "--no-browser", "--ip=0.0.0.0"]
57+
58+
USER neuro

0 commit comments

Comments
 (0)