Where do I find Dockerfile for an image hosted in dockerhub

I’m a noob here. Please Be gentle.

I’m interested in obtaining a Dockerfile from this dockerhub pytorch/pytorch:2.2.0-cuda12.1-cudnn8-devel

After some research, I found that Dockerfile for images on DOckerhub are often posted on github.
I found a pytorch github page, but I’m not sure whether this is even the right github page for the docker image I’m interested in. The Dockerhub seems to have several version/tag, but there’s only 1 Dockerfile on github page.

My questions are:

  1. how do I know the github page correspond to the Dockerhub page? I see both are pytorch/pytorch (what is this anyway)
  2. is the different docker image just a matter of changing parameter/version used in the dockerfile?

WOuld appreciate any input to a noob here :slight_smile:

A Docker image on Hub has no requirement to link a source repository, this is optional.

But you can read the image readme, get to PyTorch homepage and their Github, check their Dockerfile in root.

The Dockerfile itself can potentially be used to build different images, depending on variables, scripts and binaries loaded, and the folder it was executed in.

Usually you will find some build instructions in the repo.