1.1.0-debian-9-r0 release

This commit is contained in:
Bitnami Bot
2019-05-06 08:17:43 +00:00
parent e47865f7cb
commit cea45be1e5
6 changed files with 240 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
FROM bitnami/minideb-extras-base:stretch-r236
LABEL maintainer "Bitnami <containers@bitnami.com>"
ENV BITNAMI_PKG_CHMOD="-R g+rwX" \
HOME="/" \
OS_ARCH="amd64" \
OS_FLAVOUR="debian-9" \
OS_NAME="linux"
# Install required system packages and dependencies
RUN install_packages libc6 libgcc1 libgomp1 libquadmath0 libstdc++6 libx11-6
RUN . ./libcomponent.sh && component_unpack "miniconda" "4.6.14-0" --checksum eeb559d3328bccff1cd7544a49e6bea6ed9d3cc3337b27432255e989e39b9de2
RUN . ./libcomponent.sh && component_unpack "pytorch" "1.1.0-0" --checksum 4c8c0dafaea8760cb2f5ab45ec244f4da87e2320205f888645ebf35ab2cede31
COPY rootfs /
RUN /prepare.sh
ENV BITNAMI_APP_NAME="pytorch" \
BITNAMI_IMAGE_VERSION="1.1.0-debian-9-r0" \
LD_LIBRARY_PATH="/opt/bitnami/miniconda/lib/python3.7/site-packages/torch/lib/:/opt/bitnami/miniconda/lib/python3.7/site-packages/PIL/.libs/:$LD_LIBRARY_PATH" \
NAMI_PREFIX="/.nami" \
PATH="/opt/bitnami/miniconda/bin:$PATH"
WORKDIR /app
USER 1001
ENTRYPOINT [ "/entrypoint.sh" ]
CMD [ "python" ]

View File

@@ -0,0 +1,8 @@
version: '2'
services:
pytorch:
tty: true
image: 'bitnami/pytorch:1'
volumes:
- '.:/app'

View File

@@ -0,0 +1,15 @@
#!/bin/bash
set -o errexit
set -o nounset
set -o pipefail
#set -o xtrace
# shellcheck disable=SC1091
# Load libraries
. /libbitnami.sh
print_welcome_page
echo ""
exec "$@"

View File

@@ -0,0 +1,14 @@
#!/bin/bash
# shellcheck disable=SC1091
# Load libraries
. /libfs.sh
PYTORCH_BASEDIR="/opt/bitnami/miniconda"
PYTORCH_WORKSPACE="/app"
# Ensure non-root user has write permissions on the workspace
ensure_dir_exists "$PYTORCH_WORKSPACE"
chmod -R g+rwX "$PYTORCH_BASEDIR" "$PYTORCH_WORKSPACE"

169
bitnami/pytorch/README.md Normal file
View File

@@ -0,0 +1,169 @@
# What is PyTorch?
> PyTorch is a deep learning platform that accelerates the transition from research prototyping to production deployment. It is built for full integration into Python that enables you to use it with its libraries and main packages.
>
> PyTorch enables tensor computation with strong GPU acceleration and provides deep neural networks built on a tape-based autograd system for faster and more flexible experimentation and efficient production deployment.
>
> The docker image includes Torchvision for specific computer vision support. The Torchvision package includes common datasets, model architectures and image transformations for computer vision.
[pytorch.org](https://pytorch.org/)
# TL;DR;
```bash
$ docker run -it --name pytorch bitnami/pytorch
```
## Docker Compose
```bash
$ curl -sSL https://raw.githubusercontent.com/bitnami/bitnami-docker-pytorch/master/docker-compose.yml > docker-compose.yml
$ docker-compose up -d
```
# Why use Bitnami Images?
* Bitnami closely tracks upstream source changes and promptly publishes new versions of this image using our automated systems.
* With Bitnami images the latest bug fixes and features are available as soon as possible.
* Bitnami containers, virtual machines and cloud images use the same components and configuration approach - making it easy to switch between formats based on your project needs.
* All our images are based on [minideb](https://github.com/bitnami/minideb) a minimalist Debian based container image which gives you a small base container image and the familiarity of a leading linux distribution.
* Bitnami container images are released daily with the latest distribution packages available.
> This [CVE scan report](https://quay.io/repository/bitnami/pytorch?tab=tags) contains a security report with all open CVEs. To get the list of actionable security issues, find the "latest" tag, click the vulnerability report link under the corresponding "Security scan" field and then select the "Only show fixable" filter on the next page.
# Why use a non-root container?
Non-root container images add an extra layer of security and are generally recommended for production environments. However, because they run as a non-root user, privileged tasks are typically off-limits. Learn more about non-root containers [in our docs](https://docs.bitnami.com/containers/how-to/work-with-non-root-containers/).
# Supported tags and respective `Dockerfile` links
Learn more about the Bitnami tagging policy and the difference between rolling tags and immutable tags [in our documentation page](https://docs.bitnami.com/containers/how-to/understand-rolling-tags-containers/).
* [`1-ol-7`, `1.1.0-ol-7-r0` (1/ol-7/Dockerfile)](https://github.com/bitnami/bitnami-docker-pytorch/blob/1.1.0-ol-7-r0/1/ol-7/Dockerfile)
* [`1-debian-9`, `1.1.0-debian-9-r0`, `1`, `1.1.0`, `1.1.0-r0`, `latest` (1/debian-9/Dockerfile)](https://github.com/bitnami/bitnami-docker-pytorch/blob/1.1.0-debian-9-r0/1/debian-9/Dockerfile)
Subscribe to project updates by watching the [bitnami/pytorch GitHub repo](https://github.com/bitnami/bitnami-docker-pytorch).
# Get this image
The recommended way to get the Bitnami Pytorch Docker Image is to pull the prebuilt image from the [Docker Hub Registry](https://hub.docker.com/r/bitnami/pytorch).
```bash
$ docker pull bitnami/pytorch:latest
```
To use a specific version, you can pull a versioned tag. You can view the [list of available versions](https://hub.docker.com/r/bitnami/pytorch/tags/) in the Docker Hub Registry.
```bash
$ docker pull bitnami/pytorch:[TAG]
```
If you wish, you can also build the image yourself.
```bash
$ docker build -t bitnami/pytorch https://github.com/bitnami/bitnami-docker-pytorch.git
```
# Entering the REPL
By default, running this image will drop you into the Python REPL, where you can interactively test and try things out with PyTorch in Python.
```bash
$ docker run -it --name pytorch bitnami/pytorch
```
# Configuration
## Running your PyTorch app
The default work directory for the PyTorch image is `/app`. You can mount a folder from your host here that includes your PyTorch script, and run it normally using the `python` command.
```bash
$ docker run -it --name pytorch -v /path/to/app:/app bitnami/pytorch \
python script.py
```
## Running a PyTorch app with package dependencies
If your PyTorch app has a `requirements.txt` defining your app's dependencies, you can install the dependencies before running your app.
```bash
$ docker run -it --name pytorch -v /path/to/app:/app bitnami/pytorch \
sh -c "conda install -y --file requirements.txt && python script.py"
```
**Further Reading:**
- [pytorch documentation](https://pytorch.org/docs/stable/index.html)
- [conda documentation](https://docs.conda.io/en/latest/)
# Maintenance
## Upgrade this image
Bitnami provides up-to-date versions of PyTorch, including security patches, soon after they are made upstream. We recommend that you follow these steps to upgrade your container.
### Step 1: Get the updated image
```bash
$ docker pull bitnami/pytorch:latest
```
or if you're using Docker Compose, update the value of the image property to `bitnami/pytorch:latest`.
### Step 2: Remove the currently running container
```bash
$ docker rm -v pytorch
```
or using Docker Compose:
```bash
$ docker-compose rm -v pytorch
```
### Step 3: Run the new image
Re-create your container from the new image.
```bash
$ docker run --name pytorch bitnami/pytorch:latest
```
or using Docker Compose:
```bash
$ docker-compose up pytorch
```
# Contributing
We'd love for you to contribute to this container. You can request new features by creating an [issue](https://github.com/bitnami/bitnami-docker-pytorch/issues), or submit a [pull request](https://github.com/bitnami/bitnami-docker-pytorch/pulls) with your contribution.
# Issues
If you encountered a problem running this container, you can file an [issue](https://github.com/bitnami/bitnami-docker-pytorch/issues). For us to provide better support, be sure to include the following information in your issue:
- Host OS and version
- Docker version (`$ docker version`)
- Output of `$ docker info`
- Version of this container (`$ echo $BITNAMI_IMAGE_VERSION` inside the container)
- The command you used to run the container, and any relevant output you saw (masking any sensitive information)
# License
Copyright (c) 2019 Bitnami
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
<http://www.apache.org/licenses/LICENSE-2.0>
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

View File

@@ -0,0 +1,8 @@
version: '2'
services:
pytorch:
tty: true
image: 'bitnami/pytorch:1'
volumes:
- '.:/app'