Files
docker-stacks/tagging/images_hierarchy.py
Thijs Walcarius 278dd76837 Add jupyter/pytorch-notebook (#1936)
* Add PyTorch image

* Fix linting errors

* Fix link to pytorch website

* Address review comments

* Fix PytorchVersionTagger

* Remove "+cpu" suffix from pytorch version tag

* Update selecting.md

* Rename pytorch-notebook/.dockerignore to images/pytorch-notebook/.dockerignore

* Rename pytorch-notebook/Dockerfile to images/pytorch-notebook/Dockerfile

* Rename pytorch-notebook/README.md to images/pytorch-notebook/README.md

* Add pytorch-notebook to registry-overviews

* Add registry to pytorch image

* Use Quay.io

* Remove incorrect link

* Update action.yml

* Update docker.yml

* Remove information about Docker Hub, because this image won't be uploaded to Docker Hub

* Update docker.yml

* Update action.yml

* Add pytorch-notebook to registry-move.yml

---------

Co-authored-by: Ayaz Salikhov <mathbunnyru@users.noreply.github.com>
Co-authored-by: Ayaz Salikhov <mathbunnyru@gmail.com>
2023-11-22 11:56:45 +01:00

95 lines
2.9 KiB
Python

# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
from dataclasses import dataclass, field
from typing import Optional
from tagging.manifests import (
AptPackagesManifest,
CondaEnvironmentManifest,
JuliaPackagesManifest,
ManifestInterface,
RPackagesManifest,
SparkInfoManifest,
)
from tagging.taggers import (
DateTagger,
HadoopVersionTagger,
JavaVersionTagger,
JuliaVersionTagger,
JupyterHubVersionTagger,
JupyterLabVersionTagger,
JupyterNotebookVersionTagger,
PythonMajorMinorVersionTagger,
PythonVersionTagger,
PytorchVersionTagger,
RVersionTagger,
SHATagger,
SparkVersionTagger,
TaggerInterface,
TensorflowVersionTagger,
UbuntuVersionTagger,
)
@dataclass
class ImageDescription:
parent_image: Optional[str]
taggers: list[TaggerInterface] = field(default_factory=list)
manifests: list[ManifestInterface] = field(default_factory=list)
ALL_IMAGES = {
"docker-stacks-foundation": ImageDescription(
parent_image=None,
taggers=[
SHATagger(),
DateTagger(),
UbuntuVersionTagger(),
PythonMajorMinorVersionTagger(),
PythonVersionTagger(),
],
manifests=[CondaEnvironmentManifest(), AptPackagesManifest()],
),
"base-notebook": ImageDescription(
parent_image="docker-stacks-foundation",
taggers=[
JupyterNotebookVersionTagger(),
JupyterLabVersionTagger(),
JupyterHubVersionTagger(),
],
),
"minimal-notebook": ImageDescription(parent_image="base-notebook"),
"scipy-notebook": ImageDescription(parent_image="minimal-notebook"),
"r-notebook": ImageDescription(
parent_image="minimal-notebook",
taggers=[RVersionTagger()],
manifests=[RPackagesManifest()],
),
"julia-notebook": ImageDescription(
parent_image="minimal-notebook",
taggers=[JuliaVersionTagger()],
manifests=[JuliaPackagesManifest()],
),
"tensorflow-notebook": ImageDescription(
parent_image="scipy-notebook", taggers=[TensorflowVersionTagger()]
),
"pytorch-notebook": ImageDescription(
parent_image="scipy-notebook", taggers=[PytorchVersionTagger()]
),
"datascience-notebook": ImageDescription(
parent_image="scipy-notebook",
taggers=[RVersionTagger(), JuliaVersionTagger()],
manifests=[RPackagesManifest(), JuliaPackagesManifest()],
),
"pyspark-notebook": ImageDescription(
parent_image="scipy-notebook",
taggers=[SparkVersionTagger(), HadoopVersionTagger(), JavaVersionTagger()],
manifests=[SparkInfoManifest()],
),
"all-spark-notebook": ImageDescription(
parent_image="pyspark-notebook",
taggers=[RVersionTagger()],
manifests=[RPackagesManifest()],
),
}