Skip to content
Snippets Groups Projects
Commit 91bfc105 authored by Rafal Skolasinski's avatar Rafal Skolasinski
Browse files

wip: remove physics dependencies; update packages

parent 0e800072
No related branches found
No related tags found
No related merge requests found
Pipeline #19011 passed
......@@ -43,6 +43,9 @@ Environment in this image has all packages the same with only stable Kwant being
## Building and installing python codes
**NOTE:** this functionality is being dropped - latest image that comes with it is tagged as `2018.5`.
Code development process can be simplified by working in reproducible environments, like docker container.
For this purpose I added a volume ``/src`` and convenient scripts (build and test) in ``/usr/local`` directory that can be executed through ``docker run command``.
These scripts allow to easy build and install (in development mode) python source code into the ``base`` environment.
......
FROM rafalskolasinski/science:latest
FROM rafalskolasinski/science:2018.5
LABEL maintainer="Rafal Skolasinski <r.j.skolasinski@gmail.com>"
......
......@@ -9,35 +9,29 @@ RUN apt-get update && apt-get install --yes openssh-client
# Add environment file
RUN mkdir /environments
COPY environment.yml build.conf /environments/
COPY environment.yml /environments/
# Create the main research environment
RUN conda env update -n base -f /environments/environment.yml && \
pip install xyzpy==0.2.5 tqdm==4.28.1 && \
RUN conda install --yes conda-forge::conda=4.7.5 && \
conda env update -n base -f /environments/environment.yml && \
pip install xyzpy==0.3.1 tqdm==4.32.2 && \
conda clean -tipsy
# Enable jupyter extension
ARG NODE_OPTIONS=--max-old-space-size=4096
RUN jupyter nbextension enable --py widgetsnbextension --sys-prefix && \
jupyter nbextension enable --py plotlywidget --sys-prefix && \
jupyter labextension install nbdime-jupyterlab && \
RUN jupyter labextension install nbdime-jupyterlab && \
jupyter labextension install @pyviz/jupyterlab_pyviz && \
jupyter labextension install @jupyter-widgets/jupyterlab-manager@0.38 --no-build && \
jupyter labextension install plotlywidget@0.5.2 --no-build && \
jupyter labextension install jupyterlab-chart-editor@1.0 --no-build && \
jupyter labextension install @jupyterlab/plotly-extension@0.18.1 --no-build && \
jupyter lab build
jupyter labextension install plotlywidget@0.11.0 --no-build && \
jupyter labextension install @jupyterlab/plotly-extension@0.18.2 --no-build && \
jupyter labextension install jupyterlab-chart-editor@1.1 --no-build && \
jupyter lab build && \
jupyter nbextension enable --py widgetsnbextension --sys-prefix && \
jupyter nbextension enable --py plotlywidget --sys-prefix
# Fix permissions (required when following the base image)
RUN fix-permissions $HOME && \
fix-permissions $CONDA_DIR
# Add scripts and place for building source codes
VOLUME /src
ADD scripts/set.build.conf.sh /usr/local/bin/set.build.conf
ADD scripts/build.sh /usr/local/bin/build
ADD scripts/test.sh /usr/local/bin/test
# Switch back to jovyan to avoid accidental container runs as root
USER $NB_UID
[mumps]
include_dirs = PREFIX/include
library_dirs = PREFIX/lib
libraries = zmumps mumps_common pord metis esmumps scotch scotcherr mpiseq gfortran openblas
extra_link_args = -Wl,-rpath=PREFIX/lib
name: science
dependencies:
- conda-forge::python=3.6.6
- conda-forge::python=3.7.1
# misc tools
- conda-forge::nbdime=1.0.2
- conda-forge::nbdime=1.0.6
# main scientific packages
- conda-forge::scipy=1.1.0
- conda-forge::numpy=1.15.4
- conda-forge::kwant=1.3.3
- conda-forge::sympy=1.1.1
- conda-forge::adaptive=0.7.0
- conda-forge::scipy=1.3.0
- conda-forge::numpy=1.16.4
- conda-forge::adaptive=0.8.1
# data analysis, visulation and serialisation
- conda-forge::matplotlib=3.0.2
- conda-forge::plotly=3.4.2
- conda-forge::holoviews=1.10.9
- conda-forge::xarray=0.11.0
- conda-forge::pandas=0.23.4
- conda-forge::matplotlib=3.1.1
- conda-forge::plotly=3.10.0
- conda-forge::holoviews=1.12.3
- conda-forge::xarray=0.12.2
- conda-forge::pandas=0.24.2
- conda-forge::deepdish=0.3.4
# parallel computation
- conda-forge::ipyparallel=6.2.3
- conda-forge::hpc05=v1.30
# kwant build depenendencies (required for kwant environment)
- conda-forge::mumps=5.1.2
- conda-forge::lapack=3.6.1
- conda-forge::cython=0.29.1
- conda-forge::gcc=4.8.5
# libgfortran : make sure all dependencies are installed
- conda-forge::libgfortran=3.0.0
- conda-forge::libgfortran-ng=7.2.0
# various packages that handle codes installed from sources
- conda-forge::pytest=4.0.1
- conda-forge::pytest-cov=2.6.0
- conda-forge::pytest=5.0.0
- conda-forge::pytest-cov=2.7.1
- conda-forge::pytest-flakes=4.0.0
- conda-forge::line_profiler=2.1.2
# scikit packages
- conda-forge::scikit-learn=0.20.1
- conda-forge::scikit-image=0.14.1
- conda-forge::scikit-learn=0.21.2
- conda-forge::scikit-image=0.15.0
# machine-learning packages
- conda-forge::keras=2.2.4
- conda-forge::tensorflow=1.10.0
# semicon
- pip:
- git+https://gitlab.kwant-project.org/semicon/semicon.git@v0.2.0
- conda-forge::tensorflow=1.13.1
#!/bin/bash
set -e
cd /src
source activate base
python setup.py build $@
pip install -e .
#!/bin/bash
source activate base
cp /environments/build.conf /src
sed -i -e "s:PREFIX:$CONDA_PREFIX:g" /src/build.conf
#!/bin/bash
set -e
cd /src
source activate base
py.test $@
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment