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

adding steps to run with enhanced security #1281

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 25 additions & 1 deletion openfl-docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,4 +86,28 @@ docker run --rm \
-v /var/run/aesmd/aesm.socket:/var/run/aesmd/aesm.socket \
--mount type=bind,source=./certs.tar,target=/certs.tar \
example_workspace bash -c "gramine-sgx fx collaborator start ..."
```
```

### Running OpenFL Container in Production
For running [TaskRunner API](https://openfl.readthedocs.io/en/latest/about/features_index/taskrunner.html#running-the-task-runner) in a production environment with enhanced security, use the following parameters to limit CPU, memory, and process IDs, and to prevent privilege escalation:

**Example Command**:
```shell
docker run --rm --name <Aggregator/Collaborator> --network openfl \
-v $WORKING_DIRECTORY:/workdir-openfl \
--cpus="0.1" \
--memory="512m" \
--pids-limit 100 \
--security-opt no-new-privileges \
openfl:latest
```
**Parameters**:
```shell
--cpus="0.1": Limits the container to 10% of a single CPU core.
--memory="512m": Limits the container to 512MB of memory.
--pids-limit 100: Limits the number of processes to 100.
--security-opt no-new-privileges: Prevents the container from gaining additional privileges.
```
These settings help ensure that your containerized application runs securely and efficiently in a production environment

**Note**: The numbers suggested here are examples/minimal suggestions and need to be adjusted according to the environment and the type of experiments you are aiming to run.
Loading