diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..bd8b2411 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,20 @@ +# To build this docker run: +# `docker build -t koswat` + +FROM python:3.10 + +RUN apt-get update + +# Copy the directories with the local koswat. +WORKDIR /koswat_src +COPY README.md LICENSE pyproject.toml poetry.lock /koswat_src/ +COPY koswat /koswat_src/koswat + +# Install the required packages +RUN pip install poetry +RUN poetry config virtualenvs.create false +RUN poetry install --without dev,docs +RUN apt-get clean autoclean + +# Define the endpoint +CMD ["python3"] \ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 100644 index 00000000..e96c1cc5 --- /dev/null +++ b/LICENSE @@ -0,0 +1,18 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + KOSWAT + Copyright (C) 2024 Stichting Deltares + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . \ No newline at end of file diff --git a/docs/installation.md b/docs/installation.md index b691d461..22f179c1 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -17,7 +17,12 @@ pip install git+https://github.com/Deltares/Koswat.git@v0.11.0 ``` | You can also do the above with a commit-hash for development branches (e.g.:`@0504c06`) - +3. Using [docker](https://www.docker.com/) (requires checking the repository in a directory): +```bash +cd +docker build -t koswat:latest -f Dockerimage . +docker run -it koswat bash +``` ## For developers 1. Checkout the code from github in a directory of your choice. You can either do this by downloading the source zip or (better) using git, for instance: @@ -29,7 +34,7 @@ pip install git+https://github.com/Deltares/Koswat.git@v0.11.0 2. Navigate to your Koswat repository and then install the koswat package with your preferred step: - 1. With [Anaconda](https://www.anaconda.com/) (our recommendation): + 1. With [Miniforge](https://conda-forge.org/miniforge/) (our recommendation): ```bash cd C:\repos\koswat conda env create -f .conf\environment.yml