Skip to content
Snippets Groups Projects
Commit 6f2c5a23 authored by lukas leufen's avatar lukas leufen
Browse files

Merge branch 'lukas_issue375_tech_update-python-version-in-setup-venv' into 'develop'

Resolve "update python version in setup venv"

See merge request !411
parents 4ffcc6b5 0acd9240
No related branches found
No related tags found
4 merge requests!430update recent developments,!413update release branch,!412Resolve "release v2.0.0",!411Resolve "update python version in setup venv"
Pipeline #97367 passed
...@@ -22,7 +22,7 @@ python3 -m venv ${cur}../venv_hdfml ...@@ -22,7 +22,7 @@ python3 -m venv ${cur}../venv_hdfml
source ${cur}/../venv_hdfml/bin/activate source ${cur}/../venv_hdfml/bin/activate
# export path for side-packages # export path for side-packages
export PYTHONPATH=${cur}/../venv_hdfml/lib/python3.6/site-packages:${PYTHONPATH} export PYTHONPATH=${cur}/../venv_hdfml/lib/python3.8/site-packages:${PYTHONPATH}
echo "##### START INSTALLING requirements_HDFML_additionals.txt #####" echo "##### START INSTALLING requirements_HDFML_additionals.txt #####"
pip install -r ${cur}/requirements_HDFML_additionals.txt pip install -r ${cur}/requirements_HDFML_additionals.txt
......
...@@ -22,7 +22,7 @@ python3 -m venv ${cur}/../venv_juwels ...@@ -22,7 +22,7 @@ python3 -m venv ${cur}/../venv_juwels
source ${cur}/../venv_juwels/bin/activate source ${cur}/../venv_juwels/bin/activate
# export path for side-packages # export path for side-packages
export PYTHONPATH=${cur}/../venv_juwels/lib/python3.6/site-packages:${PYTHONPATH} export PYTHONPATH=${cur}/../venv_juwels/lib/python3.8/site-packages:${PYTHONPATH}
echo "##### START INSTALLING requirements_JUWELS_additionals.txt #####" echo "##### START INSTALLING requirements_JUWELS_additionals.txt #####"
......
...@@ -18,11 +18,12 @@ If the installation is still not working, we recommend skipping the geographical ...@@ -18,11 +18,12 @@ If the installation is still not working, we recommend skipping the geographical
workaround [here](#workaround-to-skip-geographical-plot). For special instructions to install MLAir on the Juelich workaround [here](#workaround-to-skip-geographical-plot). For special instructions to install MLAir on the Juelich
HPC systems, see [here](#special-instructions-for-installation-on-jülich-hpc-systems). HPC systems, see [here](#special-instructions-for-installation-on-jülich-hpc-systems).
* Make sure to have the **python3.6** version installed. * Make sure to have the **python3.6** version installed (We are already using python3.8, but will refer to python3.6
here as this was used for long time and is therefore tested well.)
* (geo) A **c++ compiler** is required for the installation of the program **cartopy** * (geo) A **c++ compiler** is required for the installation of the program **cartopy**
* (geo) Install **proj** and **GEOS** on your machine using the console. * (geo) Install **proj** and **GEOS** on your machine using the console.
* Install the **python3.6 develop** libraries. * Install the **python3.6 develop** libraries.
* Install all **requirements** from [`requirements.txt`](https://gitlab.version.fz-juelich.de/toar/mlair/-/blob/master/requirements.txt) * Install all **requirements** from [`requirements.txt`](https://gitlab.jsc.fz-juelich.de/esde/machine-learning/mlair/-/blob/master/requirements.txt)
preferably in a virtual environment. You can use `pip install -r requirements.txt` to install all requirements at preferably in a virtual environment. You can use `pip install -r requirements.txt` to install all requirements at
once. Note, we recently updated the version of Cartopy and there seems to be an ongoing once. Note, we recently updated the version of Cartopy and there seems to be an ongoing
[issue](https://github.com/SciTools/cartopy/issues/1552) when installing **numpy** and **Cartopy** at the same time. [issue](https://github.com/SciTools/cartopy/issues/1552) when installing **numpy** and **Cartopy** at the same time.
...@@ -31,15 +32,11 @@ HPC systems, see [here](#special-instructions-for-installation-on-jülich-hpc-sy ...@@ -31,15 +32,11 @@ HPC systems, see [here](#special-instructions-for-installation-on-jülich-hpc-sy
`pip install numpy==<version_from_reqs>` followed be the default installation of requirements. For the latter, you can `pip install numpy==<version_from_reqs>` followed be the default installation of requirements. For the latter, you can
also use `grep numpy requirements.txt | xargs pip install`. also use `grep numpy requirements.txt | xargs pip install`.
* Installation of **MLAir**: * Installation of **MLAir**:
* Either clone MLAir from the [gitlab repository](https://gitlab.version.fz-juelich.de/toar/mlair.git) * Either clone MLAir from the [gitlab repository](https://gitlab.jsc.fz-juelich.de/esde/machine-learning/mlair.git)
and use it without installation (beside the requirements) and use it without installation (beside the requirements)
* or download the distribution file ([current version](https://gitlab.version.fz-juelich.de/toar/mlair/-/blob/master/dist/mlair-1.5.0-py3-none-any.whl)) * or download the distribution file ([current version](https://gitlab.jsc.fz-juelich.de/esde/machine-learning/mlair/-/blob/master/dist/mlair-1.5.0-py3-none-any.whl))
and install it via `pip install <dist_file>.whl`. In this case, you can simply import MLAir in any python script and install it via `pip install <dist_file>.whl`. In this case, you can simply import MLAir in any python script
inside your virtual environment using `import mlair`. inside your virtual environment using `import mlair`.
* (tf) Currently, TensorFlow-1.13 is mentioned in the requirements. We already tested the TensorFlow-1.15 version and couldn't
find any compatibility errors. Please note, that tf-1.13 and 1.15 have two distinct branches each, the default branch
for CPU support, and the "-gpu" branch for GPU support. If the GPU version is installed, MLAir will make use of the GPU
device.
## openSUSE Leap 15.1 ## openSUSE Leap 15.1
...@@ -316,8 +313,8 @@ class MyCustomisedModel(AbstractModelClass): ...@@ -316,8 +313,8 @@ class MyCustomisedModel(AbstractModelClass):
`self._output_shape` and storing the model as `self.model`. `self._output_shape` and storing the model as `self.model`.
```python ```python
import keras import tensorflow.keras as keras
from keras.layers import PReLU, Input, Conv2D, Flatten, Dropout, Dense from tensorflow.keras.layers import PReLU, Input, Conv2D, Flatten, Dropout, Dense
class MyCustomisedModel(AbstractModelClass): class MyCustomisedModel(AbstractModelClass):
...@@ -338,7 +335,7 @@ class MyCustomisedModel(AbstractModelClass): ...@@ -338,7 +335,7 @@ class MyCustomisedModel(AbstractModelClass):
* Additionally, set your custom compile options including the loss definition. * Additionally, set your custom compile options including the loss definition.
```python ```python
from keras.losses import mean_squared_error as mse from tensorflow.keras.losses import mean_squared_error as mse
class MyCustomisedModel(AbstractModelClass): class MyCustomisedModel(AbstractModelClass):
......
...@@ -61,7 +61,7 @@ How to create a customised model? ...@@ -61,7 +61,7 @@ How to create a customised model?
.. code-block:: python .. code-block:: python
from mlair import AbstractModelClass from mlair import AbstractModelClass
import keras import tensorflow.keras as keras
class MyCustomisedModel(AbstractModelClass): class MyCustomisedModel(AbstractModelClass):
......
...@@ -15,7 +15,8 @@ HPC systems, see section :ref:`Installation on Jülich HPC systems`. ...@@ -15,7 +15,8 @@ HPC systems, see section :ref:`Installation on Jülich HPC systems`.
Pre-requirements Pre-requirements
~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~
* Make sure to have the **python3.6** version installed. * Make sure to have the **python3.6** version installed (We are already using python3.8, but will refer to python3.6
here as this was used for long time and is therefore tested well.)
* (geo) A **c++ compiler** is required for the installation of the program **cartopy** * (geo) A **c++ compiler** is required for the installation of the program **cartopy**
* (geo) Install **proj** and **GEOS** on your machine using the console. * (geo) Install **proj** and **GEOS** on your machine using the console.
* Install the **python3.6 develop** libraries. * Install the **python3.6 develop** libraries.
...@@ -23,16 +24,12 @@ Pre-requirements ...@@ -23,16 +24,12 @@ Pre-requirements
Installation of MLAir Installation of MLAir
~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~
* Install all requirements from `requirements.txt <https://gitlab.version.fz-juelich.de/toar/machinelearningtools/-/blob/master/requirements.txt>`_ * Install all requirements from `requirements.txt <https://gitlab.jsc.fz-juelich.de/esde/machine-learning/mlair/-/blob/master/requirements.txt>`_
preferably in a virtual environment preferably in a virtual environment
* Either clone MLAir from the `gitlab repository <https://gitlab.version.fz-juelich.de/toar/machinelearningtools.git>`_ * Either clone MLAir from the `gitlab repository <https://gitlab.jsc.fz-juelich.de/esde/machine-learning/mlair.git>`_
* or download the distribution file (`current version <https://gitlab.version.fz-juelich.de/toar/mlair/-/blob/master/dist/mlair-1.5.0-py3-none-any.whl>`_) * or download the distribution file (`current version <https://gitlab.jsc.fz-juelich.de/esde/machine-learning/mlair/-/blob/master/dist/mlair-1.5.0-py3-none-any.whl>`_)
and install it via :py:`pip install <dist_file>.whl`. In this case, you can simply and install it via :py:`pip install <dist_file>.whl`. In this case, you can simply
import MLAir in any python script inside your virtual environment using :py:`import mlair`. import MLAir in any python script inside your virtual environment using :py:`import mlair`.
* (tf) Currently, TensorFlow-1.13 is mentioned in the requirements. We already tested the TensorFlow-1.15 version and couldn't
find any compatibility errors. Please note, that tf-1.13 and 1.15 have two distinct branches each, the default branch
for CPU support, and the "-gpu" branch for GPU support. If the GPU version is installed, MLAir will make use of the GPU
device.
Special Instructions for Installation Special Instructions for Installation
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
......
...@@ -16,11 +16,11 @@ setuptools.setup( ...@@ -16,11 +16,11 @@ setuptools.setup(
description="A framework to enable easy time series predictions with machine learning.", description="A framework to enable easy time series predictions with machine learning.",
long_description=long_description, long_description=long_description,
long_description_content_type="text/markdown", long_description_content_type="text/markdown",
url="https://gitlab.version.fz-juelich.de/toar/machinelearningtools", url="https://gitlab.jsc.fz-juelich.de/esde/machine-learning/mlair",
packages=setuptools.find_packages(), packages=setuptools.find_packages(),
classifiers=[ classifiers=[
"Programming Language :: Python :: 3", "Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License", # to be adjusted "License :: OSI Approved :: MIT License",
"Operating System :: OS Independent", "Operating System :: OS Independent",
], ],
python_requires='>=3.5', python_requires='>=3.5',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment