Commit 335cfa6b authored by Janne Hellsten's avatar Janne Hellsten
Browse files

Upgrade docker base image to nvcr.io/nvidia/pytorch:23.03-py3

Older pytorch/pytorch base images were broken due to stale PGP
keys.

This version will run PyTorch 2.0.

fixes #115
fixes #113
parent fad71a4a
......@@ -12,10 +12,9 @@
#
# This file defaults to pytorch/pytorch as it works on slightly older
# driver versions.
ARG BASE_IMAGE=pytorch/pytorch:1.10.0-cuda11.3-cudnn8-devel
FROM $BASE_IMAGE
FROM nvcr.io/nvidia/pytorch:23.03-py3
RUN apt-get update && apt-get install -y --no-install-recommends \
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
pkg-config \
libglvnd0 \
libgl1 \
......
......@@ -34,7 +34,6 @@ rest=$@
# Build the docker container
if [ "$build_container" = "1" ]; then
docker build --tag gltorch:latest -f docker/Dockerfile .
docker build --tag gltensorflow:latest --build-arg BASE_IMAGE=tensorflow/tensorflow:1.15.0-gpu-py3 -f docker/Dockerfile .
fi
if [ ! -f "$sample" ]; then
......@@ -44,16 +43,10 @@ if [ ! -f "$sample" ]; then
fi
image="gltorch:latest"
TENSORFLOW_CUDA_CACHE=""
# Magically choose the tensorflow container if running a sample from the samples/tensorflow/ directory
if [[ $sample == *"/tensorflow/"* ]]; then
image="gltensorflow:latest"
TENSORFLOW_CUDA_CACHE="-e NVDIFFRAST_CACHE_DIR=/app/tmp"
fi
echo "Using container image: $image"
echo "Running command: $sample $rest"
# Run a sample with docker
docker run --rm -it --gpus all --user $(id -u):$(id -g) \
-v `pwd`:/app --workdir /app -e TORCH_EXTENSIONS_DIR=/app/tmp $TENSORFLOW_CUDA_CACHE $image python3 $sample $rest
-v `pwd`:/app --workdir /app -e TORCH_EXTENSIONS_DIR=/app/tmp $image python3 $sample $rest
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment