Skip to content

Commit

Permalink
[Docs] Update pytorch docs to add support for Ubuntu 24.04
Browse files Browse the repository at this point in the history
Signed-off-by: Adarsh Anand <[email protected]>
  • Loading branch information
adarshan-intel committed Nov 18, 2024
1 parent e140552 commit afe6d88
Showing 1 changed file with 19 additions and 11 deletions.
30 changes: 19 additions & 11 deletions Documentation/tutorials/pytorch/index.rst
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
PyTorch PPML Framework Tutorial
===============================

.. warning::

This tutorial is outdated and may not work on the current Gramine version /
currently supported Linux distributions. Contributions to refresh it are
welcomed!

.. highlight:: sh

This tutorial presents a framework for developing PPML (Privacy-Preserving
Expand Down Expand Up @@ -91,15 +85,29 @@ user who will decrypt it and analyze its contents.
Prerequisites
-------------

- Ubuntu 20.04.
- A Linux-based operating system (e.g., Ubuntu 20.04 or later)

- PyTorch (Python3). PyTorch is a framework for machine learning based on
Python. Please `install PyTorch <https://pytorch.org/get-started/locally/>`__
before you proceed (don't forget to choose Linux as the target OS and CPU as
the compute platform).

- Gramine v1.5, with DCAP support. DCAP software infrastructure must also be
installed.
- Gramine v1.8, with DCAP support. DCAP software infrastructure must also be
installed. Please refer to the `Gramine Attestation Documentation
<https://gramine.readthedocs.io/en/latest/attestation.html>`__ for more details.


.. warning::

After running Ubuntu 24.04, it is highly recommended to use a virtual environment to manage
dependencies. You can create and activate a virtual environment with the
following commands:

.. code-block:: sh
sudo apt install python3-venv
python3 -m venv my_venv
source my_venv/bin/activate
Executing Native PyTorch
------------------------
Expand All @@ -113,7 +121,7 @@ example as a basis and will improve it to protect all user files.

Go to the directory with Gramine's PyTorch example::

git clone --depth 1 --branch v1.5 https://github.com/gramineproject/examples.git
git clone --depth 1 --branch v1.8 https://github.com/gramineproject/examples.git
cd examples/pytorch

The directory contains a Python script ``pytorchexample.py`` and other relevant
Expand Down Expand Up @@ -366,7 +374,7 @@ We will use the reference implementation of the Secret Provisioning server found
under ``CI-Examples/ra-tls-secret-prov`` directory (in the core Gramine
repository), so let's build the secret provisioning server::

git clone --depth 1 --branch v1.5 https://github.com/gramineproject/gramine.git
git clone --depth 1 --branch v1.8 https://github.com/gramineproject/gramine.git
cd gramine/CI-Examples/ra-tls-secret-prov
make app dcap RA_TYPE=dcap

Expand Down

0 comments on commit afe6d88

Please sign in to comment.