55 lines
3.3 KiB
Docker
55 lines
3.3 KiB
Docker
FROM docker.io/bitnami/minideb:bullseye
|
|
ENV HOME="/" \
|
|
OS_ARCH="amd64" \
|
|
OS_FLAVOUR="debian-11" \
|
|
OS_NAME="linux"
|
|
|
|
LABEL org.opencontainers.image.authors="https://bitnami.com/contact" \
|
|
org.opencontainers.image.description="Application packaged by Bitnami" \
|
|
org.opencontainers.image.ref.name="1.12.1-debian-11-r10" \
|
|
org.opencontainers.image.source="https://github.com/bitnami/containers/tree/main/bitnami/pytorch-intel" \
|
|
org.opencontainers.image.title="pytorch-intel" \
|
|
org.opencontainers.image.vendor="VMware, Inc." \
|
|
org.opencontainers.image.version="1.12.1"
|
|
|
|
COPY prebuildfs /
|
|
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
|
# Install required system packages and dependencies
|
|
RUN install_packages acl ca-certificates curl gzip libbz2-1.0 libc6 libcom-err2 libcrypt1 libffi7 libgcc-s1 libgomp1 libgssapi-krb5-2 libjemalloc2 libk5crypto3 libkeyutils1 libkrb5-3 libkrb5support0 liblzma5 libncursesw6 libnsl2 libreadline8 libsqlite3-0 libssl1.1 libstdc++6 libtinfo6 libtirpc3 numactl procps tar zlib1g
|
|
RUN mkdir -p /tmp/bitnami/pkg/cache/ && cd /tmp/bitnami/pkg/cache/ && \
|
|
if [ ! -f python-3.8.13-167-linux-amd64-debian-11.tar.gz ]; then \
|
|
curl -SsLf https://downloads.bitnami.com/files/stacksmith/python-3.8.13-167-linux-amd64-debian-11.tar.gz -O ; \
|
|
fi && \
|
|
echo "6e21552dc6c19b01247f3ec7bcd0401e6192519fe206e136e205ac6c3b842e7b python-3.8.13-167-linux-amd64-debian-11.tar.gz" | sha256sum -c - && \
|
|
tar -zxf python-3.8.13-167-linux-amd64-debian-11.tar.gz -C /opt/bitnami --strip-components=2 --no-same-owner --wildcards '*/files' && \
|
|
rm -rf python-3.8.13-167-linux-amd64-debian-11.tar.gz
|
|
RUN mkdir -p /tmp/bitnami/pkg/cache/ && cd /tmp/bitnami/pkg/cache/ && \
|
|
if [ ! -f pytorch-intel-1.12.1-4-linux-amd64-debian-11.tar.gz ]; then \
|
|
curl -SsLf https://downloads.bitnami.com/files/stacksmith/pytorch-intel-1.12.1-4-linux-amd64-debian-11.tar.gz -O ; \
|
|
fi && \
|
|
echo "607a7ac733ce025ec8d9a76ed2e416fc8c3323c4cbb684752bcfd0b87c0ef0c5 pytorch-intel-1.12.1-4-linux-amd64-debian-11.tar.gz" | sha256sum -c - && \
|
|
tar -zxf pytorch-intel-1.12.1-4-linux-amd64-debian-11.tar.gz -C /opt/bitnami --strip-components=2 --no-same-owner --wildcards '*/files' && \
|
|
rm -rf pytorch-intel-1.12.1-4-linux-amd64-debian-11.tar.gz
|
|
RUN mkdir -p /tmp/bitnami/pkg/cache/ && cd /tmp/bitnami/pkg/cache/ && \
|
|
if [ ! -f gosu-1.14.0-154-linux-amd64-debian-11.tar.gz ]; then \
|
|
curl -SsLf https://downloads.bitnami.com/files/stacksmith/gosu-1.14.0-154-linux-amd64-debian-11.tar.gz -O ; \
|
|
fi && \
|
|
echo "e36c3d90f4fbfbe989f40947fa7c8ab817f12fcf97d3aef893c753a20ce976ab gosu-1.14.0-154-linux-amd64-debian-11.tar.gz" | sha256sum -c - && \
|
|
tar -zxf gosu-1.14.0-154-linux-amd64-debian-11.tar.gz -C /opt/bitnami --strip-components=2 --no-same-owner --wildcards '*/files' && \
|
|
rm -rf gosu-1.14.0-154-linux-amd64-debian-11.tar.gz
|
|
RUN apt-get update && apt-get upgrade -y && \
|
|
rm -r /var/lib/apt/lists /var/cache/apt/archives
|
|
RUN chmod g+rwX /opt/bitnami
|
|
|
|
COPY rootfs /
|
|
RUN /opt/bitnami/scripts/pytorch/postunpack.sh
|
|
ENV APP_VERSION="1.12.1" \
|
|
ATEN_CPU_CAPABILITY="avx512" \
|
|
BITNAMI_APP_NAME="pytorch-intel" \
|
|
PATH="/opt/bitnami/python/bin:/opt/bitnami/common/bin:$PATH"
|
|
|
|
WORKDIR /app
|
|
USER 1001
|
|
ENTRYPOINT [ "/opt/bitnami/scripts/pytorch/entrypoint.sh" ]
|
|
CMD [ "python" ]
|