Skip to content

Commit 8032b68

Browse files
authored
Merge pull request #64 from onepanelio/release-v0.18.0
Release v0.18.0
2 parents b2f7c0d + e04181e commit 8032b68

File tree

58 files changed

+7356
-2039
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+7356
-2039
lines changed

README.md

+16-16
Original file line numberDiff line numberDiff line change
@@ -14,31 +14,31 @@ See the following references for more information on how to build these template
1414
### Workflow Templates
1515
Workflow Templates consist of YAML definitions and Docker images that define a DAG in Onepanel.
1616

17-
- [Albumentations data pre-processing](https://github.com/onepanelio/templates/tree/release-v0.18.0/workflows/albumentations-preprocessing) - This Workflow is included in [TFOD](https://github.com/onepanelio/templates/tree/release-v0.18.0/workflows/tf-object-detection-training) and [MaskRCNN](https://github.com/onepanelio/templates/tree/release-v0.18.0/workflows/maskrcnn-training) training Workflows and allows you to apply different augmentations to your data before training.
18-
- [Auto CVAT](https://github.com/onepanelio/templates/tree/release-v0.18.0/workflows/auto-cvat) - Allows you to automate your annotation workflow by creating CVAT instances and pre-populating them with data to be annotated.
19-
- [Hyperparameter tuning](https://github.com/onepanelio/templates/tree/release-v0.18.0/workflows/hyperparameter-tuning) - Hyperparameter tuning Workflow using [NNI](https://github.com/microsoft/nni). Included in Onepanel deployment.
20-
- [MaskRCNN training](https://github.com/onepanelio/templates/tree/release-v0.18.0/workflows/maskrcnn-training) - Workflow for semantic segmentation model training fully integrated with CVAT and included in Onepanel deployment.
21-
- [PyTorch training](https://github.com/onepanelio/templates/tree/release-v0.18.0/workflows/pytorch-mnist-training) - Simple MNIST training example using PyTorch.
22-
- [TensorFlow training](https://github.com/onepanelio/templates/tree/release-v0.18.0/workflows/tensorflow-mnist-training) - Simple MNIST training example using TensorFlow.
23-
- [TensorFlow Object Detection training](https://github.com/onepanelio/templates/tree/release-v0.18.0/workflows/tf-object-detection-training) - Workflow for object detection model training fully integrated with CVAT and included in Onepanel deployment.
17+
- [Albumentations data pre-processing](https://github.com/onepanelio/templates/blob/master/workflows/albumentations-preprocessing) - This Workflow is included in [TFOD](https://github.com/onepanelio/templates/tree/release-v0.18.0/workflows/tf-object-detection-training) and [MaskRCNN](https://github.com/onepanelio/templates/tree/release-v0.18.0/workflows/maskrcnn-training) training Workflows and allows you to apply different augmentations to your data before training.
18+
- [Auto CVAT](https://github.com/onepanelio/templates/blob/master/workflows/auto-cvat) - Allows you to automate your annotation workflow by creating CVAT instances and pre-populating them with data to be annotated.
19+
- [Hyperparameter tuning](https://github.com/onepanelio/templates/blob/master/workflows/hyperparameter-tuning) - Hyperparameter tuning Workflow using [NNI](https://github.com/microsoft/nni). Included in Onepanel deployment.
20+
- [MaskRCNN training](https://github.com/onepanelio/templates/blob/master/workflows/maskrcnn-training) - Workflow for semantic segmentation model training fully integrated with CVAT and included in Onepanel deployment.
21+
- [PyTorch training](https://github.com/onepanelio/templates/blob/master/workflows/pytorch-mnist-training) - Simple MNIST training example using PyTorch.
22+
- [TensorFlow training](https://github.com/onepanelio/templates/blob/master/workflows/tensorflow-mnist-training) - Simple MNIST training example using TensorFlow.
23+
- [TensorFlow Object Detection training](https://github.com/onepanelio/templates/blob/master/workflows/tf-object-detection-training) - Workflow for object detection model training fully integrated with CVAT and included in Onepanel deployment.
2424

2525
### Workspace Templates
2626
Workspace Templates consist of YAML definitions and Docker images that define stateful instances like JupyterLab, CVAT and any other IDE.
2727

28-
- [CVAT](https://github.com/onepanelio/templates/tree/release-v0.18.0/workspaces/cvat) - An interactive video and image annotation tool for computer vision.
29-
- [JupyterLab](https://github.com/onepanelio/templates/tree/release-v0.18.0/workspaces/jupyterlab) - An extensible environment for interactive and reproducible computing, based on Jupyter Notebook.
30-
- [Eclipse Theia](https://github.com/onepanelio/templates/tree/release-v0.18.0/workspaces/theia) - An extensible platform to develop multi-language cloud and desktop IDEs with state-of-the-art web technologies.
31-
- [Ubuntu VNC](https://github.com/onepanelio/templates/tree/release-v0.18.0/workspaces/vnc) (alpha) - A full Ubuntu instance accessible in your web browser.
32-
- [Visual Studio Code](https://github.com/onepanelio/templates/tree/release-v0.18.0/workspaces/vscode) - A lightweight but powerful source code editor which has support for just about everything.
28+
- [CVAT](https://github.com/onepanelio/templates/blob/master/workspaces/cvat) - An interactive video and image annotation tool for computer vision.
29+
- [JupyterLab](https://github.com/onepanelio/templates/blob/master/workspaces/jupyterlab) - An extensible environment for interactive and reproducible computing, based on Jupyter Notebook.
30+
- [Eclipse Theia](https://github.com/onepanelio/templates/blob/master/workspaces/theia) - An extensible platform to develop multi-language cloud and desktop IDEs with state-of-the-art web technologies.
31+
- [Ubuntu VNC](https://github.com/onepanelio/templates/blob/master/workspaces/vnc) (alpha) - A full Ubuntu instance accessible in your web browser.
32+
- [Visual Studio Code](https://github.com/onepanelio/templates/blob/master/workspaces/vscode) - A lightweight but powerful source code editor which has support for just about everything.
3333

3434
### Sidecars
3535
Sidecars are components that extend your Workspace or Workflow Tasks.
3636

37-
- [FileSyncer](https://github.com/onepanelio/templates/tree/release-v0.18.0/sidecars/filesyncer) - Provides the APIs to sync files between Workspaces and default object storage.
38-
- [NNI Web UI](https://github.com/onepanelio/templates/tree/release-v0.18.0/sidecars/nni-web-ui) - Provides a proxy to NNI Web UI so that you can see the experiments in your hyperparameter tuning Workflows.
37+
- [FileSyncer](https://github.com/onepanelio/templates/blob/master/sidecars/filesyncer) - Provides the APIs to sync files between Workspaces and default object storage.
38+
- [NNI Web UI](https://github.com/onepanelio/templates/blob/master/sidecars/nni-web-ui) - Provides a proxy to NNI Web UI so that you can see the experiments in your hyperparameter tuning Workflows.
3939

4040
### Tasks
4141
Tasks are the individual tasks in your Workflow (nodes in your DAG).
4242

43-
- [Metrics writer](https://github.com/onepanelio/templates/tree/release-v0.18.0/tasks/metrics-writer) - Task you can include to any Workflow Template to persist final metrics.
44-
- [Slack notifications](https://github.com/onepanelio/templates/tree/release-v0.18.0/tasks/slack-notify) - Task you can add to any Workflow or Workspace Template to send notifications to Slack.
43+
- [Metrics writer](https://github.com/onepanelio/templates/blob/master/tasks/metrics-writer) - Task you can include to any Workflow Template to persist final metrics.
44+
- [Slack notifications](https://github.com/onepanelio/templates/blob/master/tasks/slack-notify) - Task you can add to any Workflow or Workspace Template to send notifications to Slack.

sidecars/filesyncer/Dockerfile.s3 renamed to sidecars/filesyncer/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.13.10 AS builder
1+
FROM golang:1.15 AS builder
22

33
WORKDIR /go/src
44
COPY . .

sidecars/filesyncer/Dockerfile.gcs

-12
This file was deleted.

sidecars/filesyncer/Makefile

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
ifndef version
2+
$(error version is undefined)
3+
endif
4+
5+
docker-build:
6+
docker build -t onepanel/filesyncer:$(version) .
7+
8+
docker-push:
9+
docker push onepanel/filesyncer:$(version)
10+
11+
docker: docker-build docker-push

sidecars/filesyncer/README.md

+26-22
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,32 @@
1-
# File-Syncer
1+
# FileSyncer
22

3-
Sidecar container for syncing files from multiple object storage providers.
3+
Sidecar container for syncing files from the storage providers supported by Onepanel.
44

5-
Currently supports:
5+
## How to run locally
66

7-
- S3
8-
- GCS
9-
- Azure blob storage
7+
`filesyncer` is meant to run in Onepanel as a sidecar container. For development, you can run it as follows.
108

9+
### Server mode
1110

12-
## How to run locally
11+
In this mode, you can send HTTP requests to `filesyncer` to sync down from an object storage prefix to a local path or sync up from a local path to an object storage prefix.
12+
13+
To run `filesyncer` in server mode:
14+
15+
```bash
16+
go run main.go server -server-prefix /sys/filesyncer
17+
```
1318

14-
`file-syncer` is meant to run in Onepanel as a sidecar container.
19+
To test the endpoints:
1520

16-
For development, you can run as follows:
21+
```bash
22+
# Sync down
23+
curl localhost:8888/sys/filesyncer/api/sync -X POST --data '{"action": "download", "path":"/tmp", "prefix":"artifacts/my-namespace/"}'
24+
25+
# Sync up
26+
curl localhost:8888/sys/filesyncer/api/sync -X POST --data '{"action": "upload", "path":"/tmp", "prefix":"artifacts/my-namespace/"}'
27+
```
28+
29+
### Automatic syncing mode
1730

1831
```bash
1932
FS_PATH=./files FS_PREFIX=data go run main.go upload
@@ -28,27 +41,18 @@ FS_PATH=./files FS_PREFIX=data FS_PROVIDER=s3 AWS_ACCESS_KEY_ID=<value> AWS_SECR
2841
You can also indicate `provider`, `path` and `prefix` as flags:
2942

3043
```bash
31-
AWS_ACCESS_KEY_ID=<value> AWS_SECRET_ACCESS_KEY=<value> go run main.go upload --provider s3 --path ./files --prefix data
44+
AWS_ACCESS_KEY_ID=<value> AWS_SECRET_ACCESS_KEY=<value> go run main.go upload --path ./files --prefix data
3245
```
3346

3447
You can also run via `docker` as follows:
3548

3649
```bash
37-
# s3
38-
docker run -it -v $(pwd)/files:/mnt -e AWS_ACCESS_KEY_ID=<value> -e AWS_SECRET_ACCESS_KEY=<value> file-syncer:latest [upload|download] \
39-
--provider s3 --path /mnt --bucket <bucket> --prefix <prefix>
40-
41-
# gcs
42-
docker run -it -v $(pwd)/files:/mnt -e GOOGLE_APPLICATION_CREDENTIALS=<key.json-path> file-syncer:latest [upload|download] \
43-
--provider gcs --path /mnt --bucket <bucket> --prefix <prefix>
44-
45-
# az
46-
docker run -it -v $(pwd)/files:/mnt -e AZURE_STORAGE_ACCOUNT=<account> -e AZURE_STORAGE_KEY=<key> file-syncer:latest [upload|download] \
47-
--provider az --path /mnt --bucket <container> --prefix <prefix>
50+
docker run -it -v $(pwd)/files:/mnt -e AWS_ACCESS_KEY_ID=<value> -e AWS_SECRET_ACCESS_KEY=<value> filesyncer:0.17.0 [upload|download] \
51+
--path /mnt --bucket <bucket> --prefix <prefix>
4852
```
4953

5054
Note that also indicate `FS_PROVIDER`, `FS_PATH` and `FS_PREFIX` as environment variables in the Docker commands, or you can mount the secret mocks like so:
5155

5256
```bash
53-
docker run -v $(pwd)/files:/mnt -v $(pwd)/onepanel:/etc/onepanel -e FS_PATH=/mnt -e FS_PREFIX=data filesyncer:gcs upload
57+
docker run -v $(pwd)/files:/mnt -v $(pwd)/onepanel:/etc/onepanel -e FS_PATH=/mnt -e FS_PREFIX=data filesyncer:0.17.0 upload
5458
```

sidecars/filesyncer/go.mod

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
module github.com/onepanelio/templates/sidecars/filesyncer
22

3-
go 1.14
3+
go 1.15
44

55
require (
66
github.com/robfig/cron/v3 v3.0.0
77
sigs.k8s.io/yaml v1.2.0
8+
github.com/justinas/alice v1.2.0
89
)

sidecars/filesyncer/go.sum

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
22
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
3+
github.com/justinas/alice v1.2.0 h1:+MHSA/vccVCF4Uq37S42jwlkvI2Xzl7zTPCN5BnZNVo=
4+
github.com/justinas/alice v1.2.0/go.mod h1:fN5HRH/reO/zrUflLfTN43t3vXvKzvZIENsNEe7i7qA=
35
github.com/onepanelio/templates v0.2.0 h1:1+3QTlKRMQxaxDlYm2NqVDeyYcfwBfSIjFOZ9iJgWqY=
46
github.com/robfig/cron/v3 v3.0.0 h1:kQ6Cb7aHOHTSzNVNEhmp8EcWKLb4CbiMW9h9VyIhO4E=
57
github.com/robfig/cron/v3 v3.0.0/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro=

0 commit comments

Comments
 (0)