Skip to content

Commit

Permalink
updated cli.md
Browse files Browse the repository at this point in the history
  • Loading branch information
danko-miladinovic committed Aug 20, 2024
1 parent 016d7fc commit 1852d21
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
11 changes: 2 additions & 9 deletions docs/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ To upload an algorithm, use the following command:
./build/cocos-cli algo /path/to/algorithm /path/to/private/key
```

Currently, support is provided for three types of algorithms: executable binaries, Python files, and Docker images (provided as tar files). The above command expects an algorithm in binary format that will be executed inside the secure VM by the agent. For Python files, the algo file, the requirements file, and the Python runtime are required. For Docker images, the Docker image is required along with the Docker start command and the absolut paths to directories where the datasets and results directories of the SVM will be mounted.
Currently, support is provided for three types of algorithms: executable binaries, Python files, and Docker images (provided as tar files). The above command expects an algorithm in binary format that will be executed inside the secure VM by the agent. For Python files, the algo file, the requirements file, and the Python runtime are required. For Docker images, the Docker image is required.

To run a python file, use the following command:

Expand All @@ -54,7 +54,7 @@ To run a python file, use the following command:
to run a Docker image (instructions for building a docker image that uses the `lin_reg.py` algorithm from the cocos repository can be found [here](docker)), use the following command:

```bash
./build/cocos-cli algo /path/to/algorithm /path/to/private/key --algorithm docker --dockercmd "docker run command" --datasets "/cocos/datasets" --results "/cocos/results"
./build/cocos-cli algo /path/to/algorithm /path/to/private/key --algorithm docker"
```
The agent grpc url is required for this operation, this will be available once the TEE has been provisioned and agent is running.
Expand All @@ -63,18 +63,11 @@ Supported flags:
```shell
-a, --algorithm string Algorithm type to run (default "bin")
--datasets string The absolut path to the directory inside the docker image where the datasets will be mounted (default "/cocos/datasets")
-c, --dockercmd string The docker start command (default "python3 /cocos/algorithm.py")
-h, --help help for algo
--python-runtime string Python runtime to use (default "python3")
-r, --requirements string Python requirements file
--results string The absolut path to the directory inside the docker image where the results directory will be mounted (default "/cocos/results")
```
##### Example Docker image

This is an ex

#### Upload Dataset
To upload a dataset, use the following command:
Expand Down
2 changes: 1 addition & 1 deletion docs/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,5 @@ docker save linreg > linreg.tar
When the SVM starts, you can use the flag `algorithm` with the value `docker` of the `algo` CLI option to send the docker image to the Agent.

```bash
go run ./cocos/cmd/cli/main.go algo --algorithm docker ./linreg.tar <private_key_file_path>
go run ./cocos/cmd/cli/main.go algo --algorithm docker ./linreg.tar <private_key_file_path>
```

0 comments on commit 1852d21

Please sign in to comment.