Closed CasellaJr closed 1 year ago
The tutorial on the page https://gramine.readthedocs.io/en/latest/tutorials/pytorch/index.html is stale unfortunately. We haven't updated it to work with the latest Gramine yet, sorry. Thus, there may be errors like you encountered.
But going back to your original issue:
With
python3 mnist.py
it works. With non-SGX Graminegramine-direct ./pytorch mnist.py
It works. Now, I am trying to run SGX Gramine withgramine-sgx ./pytorch mnist.py
. If I run this command I get:/usr/bin/python3.10: can't open file '//mnist.py': [Errno 13] Permission denied
.
Can you show your manifest file? I guess you based on it on this manifest: https://github.com/gramineproject/gramine/blob/master/CI-Examples/python/python.manifest.template ?
In this case, you need to add mnist.py
in the sgx.trusted_files
list in the manifest. The "Permissions denied" error you get is because Gramine-SGX by default does not allow to open files that were not explicitly specified in the manifest.
Yes, you were right. I fixed this, so now my file mnist.py
is trusted. Now, inside my script I need to access the dataset MNIST. So, inside the manifest I have also added the files of the dataset. However, the format of the dataset is not accepted by gramine: graminelibos.manifest.ManifestError: Unsupported URI type: /MNIST/raw/train-images-idx3-ubyte make: *** [Makefile:36: sgx_sign] Error 1
. How can I solve?
git clone --depth 1 --branch v1.2
Please don't use outdated Gramine versions, we don't provide support for them.
However, the format of the dataset is not accepted by gramine [...]
Try adding file:
before that URI in the manifest (see https://gramine.readthedocs.io/en/latest/manifest-syntax.html).
Oh yes, you are right, my mistake, I forgot the file:
😄
Closing this issue then.
I am trying to train a Neural Network on MNIST using SGX. My file is called "mnist.py". With
python3 mnist.py
it works. With non-SGX Graminegramine-direct ./pytorch mnist.py
It works. Now, I am trying to run SGX Gramine withgramine-sgx ./pytorch mnist.py
. If I run this command I get:/usr/bin/python3.10: can't open file '//mnist.py': [Errno 13] Permission denied
. So, I think that I need to follow the steps here to create a python script executable by SGX Gramine. However, when I do:I have this error: