pytorch
Bitnami Helm chart for PyTorch
500K+
PyTorch is a deep learning platform that accelerates the transition from research prototyping to production deployment. Bitnami image includes Torchvision for specific computer vision support.
Trademarks: This software listing is packaged by Bitnami. The respective trademarks mentioned in the offering are owned by the respective companies, and use of them does not imply any affiliation or endorsement.
helm install my-release oci://REGISTRY_NAME/REPOSITORY_NAME/pytorch
Note: You need to substitute the placeholders
REGISTRY_NAMEandREPOSITORY_NAMEwith a reference to your Helm chart registry and repository.
This chart bootstraps a PyTorch deployment on a Kubernetes cluster using the Helm package manager.
Python is built for full integration into Python that enables you to use it with its libraries and main packages.
To install the chart with the release name my-release:
helm install my-release oci://REGISTRY_NAME/REPOSITORY_NAME/pytorch
Note You need to substitute the placeholders
REGISTRY_NAMEandREPOSITORY_NAMEwith a reference to your Helm chart registry and repository. For example, in the case of Bitnami, you need to useREGISTRY_NAME=registry-1.docker.ioandREPOSITORY_NAME=bitnamicharts.
These commands deploy PyTorch on the Kubernetes cluster in the default configuration. The Parameters section lists the parameters that can be configured.
Note List all releases using
helm list.
This section describes resource settings, rolling tags, loading files, pod affinity, backup, and other options.
Bitnami charts allow setting resource requests and limits for all containers inside the chart deployment. These are inside the resources value (check parameter table). Setting requests is essential for production workloads and these should be adapted to your specific use case.
To make this process easier, the chart contains the resourcesPreset values, which automatically sets the resources section according to different presets. Check these presets in the bitnami/common chart. However, in production workloads using resourcesPreset is discouraged as it may not fully adapt to your specific needs. Find more information on container resource management in the official Kubernetes documentation.
It is strongly recommended to use immutable tags in a production environment. This ensures your deployment does not change automatically if the same tag is updated with a different image.
Bitnami will release a new chart updating its containers if a new version of the main container, significant changes, or critical vulnerabilities exist.
The PyTorch chart supports three different ways to load your files. In order of priority, they are:
files directoryThis means that if you specify a config map with your files, it won't look for the files/ directory nor the git repository.
In order to use use an existing config map, set the configMap=my-config-map parameter.
To load your files from the files/ directory you don't have to set any option. Just copy your files inside and don't specify a ConfigMap.
Finally, if you want to clone a git repository you can use those parameters:
cloneFilesFromGit.enabled=true
cloneFilesFromGit.repository=https://github.com/my-user/my-repo
cloneFilesFromGit.revision=master
This chart allows you to set your custom affinity using the affinity parameter. Find more information about pod affinity in the Kubernetes documentation.
As an alternative, you can use the preset configurations for pod affinity, pod anti-affinity, and node affinity available at the bitnami/common chart. To do so, set the podAffinityPreset, podAntiAffinityPreset, or nodeAffinityPreset parameters.
To back up and restore Helm chart deployments on Kubernetes, you need to back up the persistent volumes from the source deployment and attach them to a new deployment using Velero, a Kubernetes backup/restore tool. Find the instructions for using Velero in this guide.
The FIPS parameters only have effect if you are using images from the Bitnami Secure Images catalog.
For more information on this new support, please refer to the FIPS Compliance section.
The Bitnami PyTorch image can persist data. If enabled, the persisted path is /bitnami/pytorch by default.
The chart mounts a Persistent Volume at this location. The volume is created using dynamic volume provisioning.
As the image run as non-root by default, it is necessary to adjust the ownership of the persistent volume so that the container can write data into it.
By default, the chart is configured to use Kubernetes Security Context to automatically change the ownership of the volume. However, this feature does not work in all Kubernetes distributions.
As an alternative, this chart supports using an initContainer to change the ownership of the volume before mounting it in the final destination.
You can enable this initContainer by setting volumePermissions.enabled to true.
The following subsections list global, common, and component-specific parameters.
| Name | Description | Value |
|---|---|---|
global.imageRegistry | Global Docker image registry | "" |
global.imagePullSecrets | Global Docker registry secret names as an array | [] |
global.defaultStorageClass | Global default StorageClass for Persistent Volume(s) | "" |
global.storageClass | DEPRECATED: use global.defaultStorageClass instead | "" |
global.defaultFips | Default value for the FIPS configuration (allowed values: '', restricted, relaxed, off). Can be overridden by the 'fips' object | restricted |
global.security.allowInsecureImages | Allows skipping image verification | false |
global.compatibility.openshift.adaptSecurityContext | Adapt the securityContext sections of the deployment to make them compatible with Openshift restricted-v2 SCC: remove runAsUser, runAsGroup and fsGroup and let the platform use their allowed default IDs. Possible values: auto (apply if the detected running cluster is Openshift), force (perform the adaptation always), disabled (do not perform adaptation) | auto |
| Name | Description | Value |
|---|---|---|
kubeVersion | Override Kubernetes version | "" |
nameOverride | String to partially override common.names.fullname template (will maintain the release name) | "" |
commonLabels | Labels to add to all deployed objects | {} |
commonAnnotations | Annotations to add to all deployed objects | {} |
fullnameOverride | String to fully override common.names.fullname template | "" |
extraDeploy | Array of extra objects to deploy with the release | [] |
diagnosticMode.enabled | Enable diagnostic mode (all probes will be disabled and the command will be overridden) | false |
diagnosticMode.command | Command to override all containers in the deployment | ["sleep"] |
diagnosticMode.args | Args to override all containers in the deployment | ["infinity"] |
| Name | Description | Value |
|---|---|---|
image.registry | PyTorch image registry | REGISTRY_NAME |
image.repository | PyTorch image repository | REPOSITORY_NAME/pytorch |
image.digest | PyTorch image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag | "" |
image.pullPolicy | PyTorch image pull policy | IfNotPresent |
image.pullSecrets | Specify docker-registry secret names as an array | [] |
worldSize | Number of nodes that will run the code | 1 |
containerPorts.pytorch | PyTorch master port. MASTER_PORT will be set to this value | 49875 |
livenessProbe.enabled | Enable livenessProbe | true |
livenessProbe.initialDelaySeconds | Initial delay seconds for livenessProbe | 5 |
livenessProbe.periodSeconds | Period seconds for livenessProbe | 60 |
livenessProbe.timeoutSeconds | Timeout seconds for livenessProbe | 45 |
livenessProbe.failureThreshold | Failure threshold for livenessProbe | 5 |
livenessProbe.successThreshold | Success threshold for livenessProbe | 1 |
readinessProbe.enabled | Enable readinessProbe | true |
readinessProbe.initialDelaySeconds | Initial delay seconds for readinessProbe | 5 |
readinessProbe.periodSeconds | Period seconds for readinessProbe | 5 |
readinessProbe.timeoutSeconds | Timeout seconds for readinessProbe | 40 |
readinessProbe.failureThreshold | Failure threshold for readinessProbe | 5 |
readinessProbe.successThreshold | Success threshold for readinessProbe | 1 |
startupProbe.enabled | Enable startupProbe | true |
startupProbe.initialDelaySeconds | Initial delay seconds for startupProbe | 5 |
startupProbe.periodSeconds | Period seconds for startupProbe | 5 |
startupProbe.timeoutSeconds | Timeout seconds for startupProbe | 20 |
startupProbe.failureThreshold | Failure threshold for startupProbe | 5 |
startupProbe.successThreshold | Success threshold for startupProbe | 1 |
customLivenessProbe | Custom livenessProbe that overrides the default one | {} |
customReadinessProbe | Custom readinessProbe that overrides the default one | {} |
customStartupProbe | Custom startupProbe that overrides the default one | {} |
podSecurityContext.enabled | Enabled Pytorch pods' Security Context | true |
podSecurityContext.fsGroupChangePolicy | Set filesystem group change policy | Always |
podSecurityContext.sysctls | Set kernel settings using the sysctl interface | [] |
podSecurityContext.supplementalGroups | Set filesystem extra groups | [] |
podSecurityContext.fsGroup | Set Pytorch pods' Security Context fsGroup | 1001 |
containerSecurityContext.enabled | Enabled containers' Security Context | true |
containerSecurityContext.seLinuxOptions | Set SELinux options in container | {} |
containerSecurityContext.runAsUser | Set containers' Security Context runAsUser | 1001 |
containerSecurityContext.runAsGroup | Set containers' Security Context runAsGroup | 1001 |
containerSecurityContext.runAsNonRoot | Set container's Security Context runAsNonRoot |
Note: the README for this chart is longer than the DockerHub length limit of 25000, so it has been trimmed. The full README can be found at https://techdocs.broadcom.com/us/en/vmware-tanzu/bitnami-secure-images/bitnami-secure-images/services/bsi-app-doc/apps-charts-pytorch-index.html
Content type
Image
Digest
sha256:727bbdf27…
Size
7.8 kB
Last updated
4 days ago
docker pull bitnamicharts/pytorch:sha256-5810041b1806e62ae3f1c62d90066ca98a548093a4f953442d6f7f4eaf80f83aPulls:
6,202
Last week