This repository has been archived by the owner on Jan 27, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
84 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
docs/graphene-workload-tutorial/workload/setup.py.template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/usr/bin/env python | ||
|
||
# Copyright 2020 Intel Corporation | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
import sys | ||
|
||
# This should only be run with python3 | ||
if sys.version_info[0] < 3: | ||
print('ERROR: must run with python3') | ||
sys.exit(1) | ||
|
||
from setuptools import setup, find_packages | ||
|
||
setup(name='avalon_python_{{ my_workload }}_workload', | ||
version=0.6, | ||
description='Avalon python workload for Graphene', | ||
author='Hyperledger Avalon', | ||
url='https://github.com/hyperledger/avalon', | ||
packages=find_packages(), | ||
data_files=[], | ||
entry_points={} | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
tc/graphene/python_worker/graphene_sgx/manifest/avalon.manifest
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
sgx.enclave_size = "256M" # Minimum enclave size, can be increased based on the requirements | ||
sgx.thread_num = 8 | ||
sgx.allow_file_creation = 1 | ||
sgx.file_check_policy = "allow_all_but_log" | ||
|
||
|
||
# the below files may differ from Docker container to Docker container, so they are marked as | ||
# allowed (this may be insecure if untrusted host maliciously modified these files!) | ||
# sgx.allowed_files.etchostname = "file:/etc/hostname" | ||
# sgx.allowed_files.etchosts = "file:/etc/hosts" | ||
# sgx.allowed_files.etcresolv = "file:/etc/resolv.conf" | ||
|
||
# Below are the required files to be allowed for "Gramine Integration with Avalon" | ||
sgx.allowed_files = [ | ||
"file:/usr/local/lib/python3.9/", | ||
"file:/home/python_worker/bash", # for getdents test | ||
"file:/etc/hostname", | ||
"file:/etc/hosts", | ||
"file:/etc/resolv.conf", | ||
"file:/root/.python_history-00001.tmp", | ||
"file:/tmp" | ||
] | ||
|
||
# To enable eventfd() for using libzmq system calls, which is disable in Graphene by default. | ||
sys.insecure__allow_eventfd = true | ||
|