Metadata-Version: 2.4
Name: album-docker
Version: 0.2.1
Summary: Album is a framework for unifying computational tools across frameworks, languages, and environments.
Author-email: Jan Philipp Albrecht <album@jpalbrecht.de>, Deborah Schmidt <mail@frauzufall.de>, Lucas Rieckert <lucas.rieckert@outlook.de>
Maintainer-email: Jan Philipp Albrecht <album@jpalbrecht.de>, Deborah Schmidt <mail@frauzufall.de>, Lucas Rieckert <lucas.rieckert@outlook.de>
License-Expression: MIT
Project-URL: Documentation, https://docs.album.solutions/en/latest/
Project-URL: Homepage, https://album.solutions/
Project-URL: DeveloperDocumentation, https://gitlab.com/album-app/album/-/wikis/home
Project-URL: Repository, https://gitlab.com/album-app/plugins/album-docker
Project-URL: Tracker, https://gitlab.com/album-app/plugins/album-docker/-/issues
Keywords: virtual environments,imaging,data analysis
Classifier: Development Status :: 4 - Beta
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Utilities
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: album<0.13.0,>=0.12.0
Requires-Dist: docker
Dynamic: license-file

# Album plugin for creating Docker images from solutions

Plugin for creating Docker images from Album solutions.

The plugin allows you to package an Album solution into a Docker image, which can then be used to run the solution in a containerized environment,
containing all necessary dependencies and configurations.
Behavior of the container will be similar to the `album run` command, but the solution will be installed in a
Docker image instead of the local environment.
This is particularly useful for ensuring that the solution runs with all its dependencies in a consistent environment.

## Installation:

1. [Install Album](https://docs.album.solutions/en/latest/installation-instructions.html#)
2. Activate the album environment:

```
micromamba activate album
```

3. Install the album docker plugin:

```
micromamba install album-docker -c conda-forge
```

Or via pip:

```
pip install album-docker
```

## Usage:

To create a docker image which contains Album with the passed solution installed run following command:

If your solution is in a directory, you can copy the solution.py file into a new folder, e.g. `mySolutionFolder`, and then run the command from that folder.

```
mkdir mySolutionFolder
cp /path/to/your/solution.py mySolutionFolder/
```

Then run the following command to create the docker image:

```

album docker --solution mySolutionFolder --output_path /your/output/path
```

The outcome will be a docker image with the tag `<group>:<name>:<version>` of the solution, where `<group>`, `<name>`, and `<version>` are defined in the solution.py file.

### Input parameter:

- solution: The album solution which should be packed into an executable.
- output_path: The path where the executable should be saved
- install-flags: Flags to pass to the album install command, e.g. '--allow-recursive'.
- install-deps: Dependencies to install in the docker image, e.g. 'gxx' or 'gxx cmake'. This line will be added to the Dockerfile as a RUN command, so you can use any command that is valid in a Dockerfile.

## Example:

```
album docker --solution mySolutionFolder --output_path /your/output/path --install-flags="--allow-recursive" --install-deps="apt update && apt install -y gxx cmake"
```

This will create a docker image with the tag <group:name:version> of the solution.
Inside the image, the solution is installed together with the dependencies gxx and cmake.
