`__, or simply, ``wandb`` helps build better models faster with experiment tracking, dataset versioning, and model management.
We'll use ``wandb`` alongside PyTorch to track our ML experiment and its concerned model parameters.
.. note::
Before running the example, create a ``wandb`` account and log in to access the API.
If you're running the code locally, run the command ``wandb login``.
If it's a remote cluster, you have to include the API key in the Dockerfile.
.. _pytorch-dockerfile:
PyTorch Dockerfile for Deployment
=================================
It is essential to build the Dockerfile with GPU support to use a GPU within PyTorch.
The example in this section uses a simple ``nvidia-supplied GPU Docker image`` as the base, and the rest of the construction is similar to the other Dockerfiles.
.. literalinclude:: ../../../../../case_studies/ml_training/mnist_classifier/Dockerfile
:language: docker
.. note::
Run your code in the ``ml_training`` directory, both locally and within the sandbox.
.. raw:: html
.. only:: html
.. figure:: /auto/case_studies/ml_training/mnist_classifier/images/thumb/sphx_glr_pytorch_single_node_and_gpu_thumb.png
:alt: Single Node, Single GPU Training
:ref:`sphx_glr_auto_case_studies_ml_training_mnist_classifier_pytorch_single_node_and_gpu.py`
.. raw:: html
.. toctree::
:hidden:
/auto/case_studies/ml_training/mnist_classifier/pytorch_single_node_and_gpu
.. raw:: html
.. only:: html
.. figure:: /auto/case_studies/ml_training/mnist_classifier/images/thumb/sphx_glr_pytorch_single_node_multi_gpu_thumb.png
:alt: Single Node, Multi GPU Training
:ref:`sphx_glr_auto_case_studies_ml_training_mnist_classifier_pytorch_single_node_multi_gpu.py`
.. raw:: html
.. toctree::
:hidden:
/auto/case_studies/ml_training/mnist_classifier/pytorch_single_node_multi_gpu
.. raw:: html
.. only :: html
.. container:: sphx-glr-footer
:class: sphx-glr-footer-gallery
.. container:: sphx-glr-download sphx-glr-download-python
:download:`Download all examples in Python source code: mnist_classifier_python.zip `
.. container:: sphx-glr-download sphx-glr-download-jupyter
:download:`Download all examples in Jupyter notebooks: mnist_classifier_jupyter.zip `
.. only:: html
.. rst-class:: sphx-glr-signature
`Gallery generated by Sphinx-Gallery `_