Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update PyTorch example for Ubuntu 24.04 #109

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

adarshan-intel
Copy link

@adarshan-intel adarshan-intel commented Nov 13, 2024

Description of Changes

This pull request adds support for running the PyTorch PPML workload on Ubuntu 24.04. A virtual environment is required for installing torchvision and pillow.

Key Changes:

  • README.md: Updated to include installation steps for Ubuntu 24.04.
  • pytorch.manifest.template: Added venv_dir in fs.mount.
  • sgx.trusted: Included venv_dir in the trusted files list.

Build Instructions

  • Run make for the non-SGX version.
  • Run make SGX=1 for the SGX version.

Run Instructions

Execute one of the following commands to run the workload:

  • Natively: python3 pytorchexample.py
  • Gramine without SGX: gramine-direct ./pytorch ./pytorchexample.py
  • Gramine with SGX: gramine-sgx ./pytorch ./pytorchexample.py

Refer to the End-To-End Confidential PyTorch Workflow for more details (DCAP software must be installed).


This change is Reviewable

@adarshan-intel adarshan-intel marked this pull request as ready for review November 13, 2024 06:45
@adarshan-intel adarshan-intel changed the title Add PyTorch Workload Support for Ubuntu 24.04 Update PyTorch example for Ubuntu 24.04 Nov 13, 2024
@adarshan-intel
Copy link
Author

adarshan-intel commented Nov 14, 2024

@kailun-qin Please review

Copy link
Contributor

@kailun-qin kailun-qin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 3 of 3 files at r1, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions, not enough approvals from maintainers (2 more required), not enough approvals from different teams (2 more required, approved so far: ) (waiting on @adarshan-intel)


pytorch/Makefile line 8 at r1 (raw file):

SHELL := /bin/bash

THIS_DIR := $(shell pwd)

better to use sth like $(dir $(lastword $(MAKEFILE_LIST)))?

Code quote:

THIS_DIR := $(shell pwd)

pytorch/README.md line 29 at r1 (raw file):

  is used by the Makefile.
- `python3 -m venv my_venv && source my_venv/bin/activate` to create and activate a virtual environment.
- `pip3 install --user torchvision pillow` to install the torchvision and pillow

Do we still need this?

Code quote:

--user

Copy link
Contributor

@kailun-qin kailun-qin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: all files reviewed, 3 unresolved discussions, not enough approvals from maintainers (2 more required), not enough approvals from different teams (2 more required, approved so far: ) (waiting on @adarshan-intel)


pytorch/README.md line 20 at r1 (raw file):

# Pre-requisites

The following steps should suffice to run the workload on a stock Ubuntu 18.04

what about here?

Code quote:

18.04

Copy link
Author

@adarshan-intel adarshan-intel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: all files reviewed, 3 unresolved discussions, not enough approvals from maintainers (2 more required), not enough approvals from different teams (2 more required, approved so far: ) (waiting on @kailun-qin)


pytorch/Makefile line 8 at r1 (raw file):

Previously, kailun-qin (Kailun Qin) wrote…

better to use sth like $(dir $(lastword $(MAKEFILE_LIST)))?

Done.


pytorch/README.md line 29 at r1 (raw file):

Previously, kailun-qin (Kailun Qin) wrote…

Do we still need this?

Done. You are right this is not reqd, while testing I removed this flag to install packages, but did not update readme.

Copy link
Author

@adarshan-intel adarshan-intel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 1 of 3 files reviewed, 3 unresolved discussions, not enough approvals from maintainers (2 more required), not enough approvals from different teams (2 more required, approved so far: ), "fixup! " found in commit messages' one-liners (waiting on @kailun-qin)


pytorch/README.md line 20 at r1 (raw file):

Previously, kailun-qin (Kailun Qin) wrote…

what about here?

Done.

Copy link
Contributor

@kailun-qin kailun-qin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 2 of 2 files at r2, all commit messages.
Reviewable status: all files reviewed, all discussions resolved, not enough approvals from maintainers (1 more required), not enough approvals from different teams (1 more required, approved so far: Intel), "fixup! " found in commit messages' one-liners

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants