diff --git a/bitnami/pytorch/1/debian-10/Dockerfile b/bitnami/pytorch/1/debian-10/Dockerfile index 6bc0f061a47d..97d6b6e0ef1d 100644 --- a/bitnami/pytorch/1/debian-10/Dockerfile +++ b/bitnami/pytorch/1/debian-10/Dockerfile @@ -18,7 +18,7 @@ RUN apt-get update && apt-get upgrade -y && \ COPY rootfs / RUN /opt/bitnami/scripts/pytorch/postunpack.sh ENV BITNAMI_APP_NAME="pytorch" \ - BITNAMI_IMAGE_VERSION="1.5.0-debian-10-r34" \ + BITNAMI_IMAGE_VERSION="1.5.0-debian-10-r36" \ 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" \ PATH="/opt/bitnami/miniconda/bin:/opt/bitnami/common/bin:$PATH" diff --git a/bitnami/pytorch/1/debian-10/prebuildfs/opt/bitnami/scripts/libfs.sh b/bitnami/pytorch/1/debian-10/prebuildfs/opt/bitnami/scripts/libfs.sh index fac947bc44f2..6ae59b086441 100644 --- a/bitnami/pytorch/1/debian-10/prebuildfs/opt/bitnami/scripts/libfs.sh +++ b/bitnami/pytorch/1/debian-10/prebuildfs/opt/bitnami/scripts/libfs.sh @@ -59,6 +59,25 @@ is_dir_empty() { fi } +######################## +# Checks whether a file can be written to or not +# arguments: +# $1 - file +# returns: +# boolean +######################### +is_file_writable() { + local file="${1:?missing file}" + local dir + dir="$(dirname "$file")" + + if [[ ( -f "$file" && -w "$file" ) || ( ! -f "$file" && -d "$dir" && -w "$dir" ) ]]; then + true + else + false + fi +} + ######################## # Configure permisions and ownership recursively # Globals: diff --git a/bitnami/pytorch/1/debian-10/prebuildfs/opt/bitnami/scripts/libnet.sh b/bitnami/pytorch/1/debian-10/prebuildfs/opt/bitnami/scripts/libnet.sh index 6cb749858648..f6380b714583 100644 --- a/bitnami/pytorch/1/debian-10/prebuildfs/opt/bitnami/scripts/libnet.sh +++ b/bitnami/pytorch/1/debian-10/prebuildfs/opt/bitnami/scripts/libnet.sh @@ -22,7 +22,7 @@ dns_lookup() { } ######################### -## Wait for a hostname and return the IP +# Wait for a hostname and return the IP # Arguments: # $1 - hostname # $2 - number of retries @@ -35,13 +35,13 @@ wait_for_dns_lookup() { local retries="${2:-5}" local seconds="${3:-1}" check_host() { - if [[ $(dns_lookup "$hostname") == "" ]]; then - false - else - true - fi + if [[ $(dns_lookup "$hostname") == "" ]]; then + false + else + true + fi } - # Wait 10 minutes for the host to be ready + # Wait for the host to be ready retry_while "check_host ${hostname}" "$retries" "$seconds" dns_lookup "$hostname" } diff --git a/bitnami/pytorch/README.md b/bitnami/pytorch/README.md index 762d4a626340..515517aed588 100644 --- a/bitnami/pytorch/README.md +++ b/bitnami/pytorch/README.md @@ -41,7 +41,7 @@ Non-root container images add an extra layer of security and are generally recom Learn more about the Bitnami tagging policy and the difference between rolling tags and immutable tags [in our documentation page](https://docs.bitnami.com/tutorials/understand-rolling-tags-containers/). -* [`1-debian-10`, `1.5.0-debian-10-r34`, `1`, `1.5.0`, `latest` (1/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-pytorch/blob/1.5.0-debian-10-r34/1/debian-10/Dockerfile) +* [`1-debian-10`, `1.5.0-debian-10-r36`, `1`, `1.5.0`, `latest` (1/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-pytorch/blob/1.5.0-debian-10-r36/1/debian-10/Dockerfile) Subscribe to project updates by watching the [bitnami/pytorch GitHub repo](https://github.com/bitnami/bitnami-docker-pytorch).