-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: cvat 1.6.0 workspace migration
- Loading branch information
Showing
3 changed files
with
170 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package migration | ||
|
||
import ( | ||
"database/sql" | ||
"github.com/pressly/goose" | ||
"path/filepath" | ||
) | ||
|
||
func initialize20211028205201() { | ||
if _, ok := initializedMigrations[20211028205201]; !ok { | ||
goose.AddMigration(Up20211028205201, Down20211028205201) | ||
initializedMigrations[20211028205201] = true | ||
} | ||
} | ||
|
||
func Up20211028205201(tx *sql.Tx) error { | ||
// This code is executed when the migration is applied. | ||
return createWorkspaceTemplate( | ||
filepath.Join("workspaces", "cvat_1_6_0", "20211028205201.yaml"), | ||
"CVAT_1.6.0", | ||
"Powerful and efficient Computer Vision Annotation Tool (CVAT)") | ||
} | ||
|
||
func Down20211028205201(tx *sql.Tx) error { | ||
return archiveWorkspaceTemplate("CVAT_1.6.0") | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,143 @@ | ||
metadata: | ||
name: CVAT | ||
kind: Workspace | ||
version: 20211028205201 | ||
action: create | ||
description: "Powerful and efficient Computer Vision Annotation Tool (CVAT 1.6.0)" | ||
spec: | ||
containers: | ||
- name: cvat-db | ||
image: postgres:10-alpine | ||
env: | ||
- name: POSTGRES_USER | ||
value: root | ||
- name: POSTGRES_DB | ||
value: cvat | ||
- name: POSTGRES_HOST_AUTH_METHOD | ||
value: trust | ||
- name: PGDATA | ||
value: /var/lib/psql/data | ||
ports: | ||
- containerPort: 5432 | ||
name: tcp | ||
volumeMounts: | ||
- name: db | ||
mountPath: /var/lib/psql | ||
- name: cvat-redis | ||
image: redis:4.0-alpine | ||
ports: | ||
- containerPort: 6379 | ||
name: tcp | ||
- name: cvat | ||
image: onepanel/cvat:v1.0.2_cvat.1.6.0 | ||
env: | ||
- name: DJANGO_MODWSGI_EXTRA_ARGS | ||
value: "" | ||
- name: ALLOWED_HOSTS | ||
value: '*' | ||
- name: CVAT_REDIS_HOST | ||
value: localhost | ||
- name: CVAT_POSTGRES_HOST | ||
value: localhost | ||
- name: CVAT_SHARE_URL | ||
value: /cvat/data | ||
- name: CVAT_SHARE_DIR | ||
value: /share | ||
- name: CVAT_DATA_DIR | ||
value: /cvat/data | ||
- name: CVAT_MEDIA_DATA_DIR | ||
value: /cvat/data/data | ||
- name: CVAT_KEYS_DIR | ||
value: /cvat/data/keys | ||
- name: CVAT_MODELS_DIR | ||
value: /cvat/data/models | ||
- name: CVAT_LOGS_DIR | ||
value: /cvat/logs | ||
- name: CVAT_ANNOTATIONS_OBJECT_STORAGE_PREFIX | ||
value: 'artifacts/$(ONEPANEL_RESOURCE_NAMESPACE)/annotations/' | ||
- name: CVAT_ONEPANEL_WORKFLOWS_LABEL | ||
value: 'key=used-by,value=cvat' | ||
- name: NVIDIA_VISIBLE_DEVICES | ||
value: all | ||
- name: NVIDIA_DRIVER_CAPABILITIES | ||
value: compute,utility | ||
- name: NVIDIA_REQUIRE_CUDA | ||
value: "cuda>=10.0 brand=tesla,driver>=384,driver<385 brand=tesla,driver>=410,driver<411" | ||
- name: ONEPANEL_MAIN_CONTAINER | ||
value: 'true' | ||
- name: CVAT_SERVERLESS | ||
value: True | ||
ports: | ||
- containerPort: 8080 | ||
name: http | ||
volumeMounts: | ||
- name: cvat-data | ||
mountPath: /cvat | ||
- name: share | ||
mountPath: /share | ||
- name: sys-namespace-config | ||
mountPath: /etc/onepanel | ||
readOnly: true | ||
- name: cvat-ui | ||
image: onepanel/cvat-ui:v1.0.2_cvat.1.6.0 | ||
ports: | ||
- containerPort: 80 | ||
name: http | ||
- name: sys-filesyncer | ||
image: onepanel/filesyncer:v1.0.0 | ||
imagePullPolicy: Always | ||
args: | ||
- server | ||
- -server-prefix=/sys/filesyncer | ||
volumeMounts: | ||
- name: share | ||
mountPath: /share | ||
- name: sys-namespace-config | ||
mountPath: /etc/onepanel | ||
readOnly: true | ||
ports: | ||
- name: cvat-ui | ||
port: 80 | ||
protocol: TCP | ||
targetPort: 80 | ||
- name: cvat | ||
port: 8080 | ||
protocol: TCP | ||
targetPort: 8080 | ||
- name: fs | ||
port: 8888 | ||
protocol: TCP | ||
targetPort: 8888 | ||
routes: | ||
- match: | ||
- uri: | ||
prefix: /sys/filesyncer | ||
route: | ||
- destination: | ||
port: | ||
number: 8888 | ||
- match: | ||
- uri: | ||
regex: \/?api.*|\/?git.*|\/?tensorflow.*|\/?onepanelio.*|\/?tracking.*|\/?auto_annotation.*|\/?analytics.*|\/?static.*|\/?admin.*|\/?documentation.*|\/?dextr.*|\/?reid.*|\/?django-rq.* | ||
- queryParams: | ||
id: | ||
regex: \d+.* | ||
route: | ||
- destination: | ||
port: | ||
number: 8080 | ||
- match: | ||
- uri: | ||
prefix: / | ||
route: | ||
- destination: | ||
port: | ||
number: 80 | ||
volumeClaimTemplates: | ||
- metadata: | ||
name: db | ||
spec: | ||
accessModes: [ "ReadWriteOnce" ] | ||
resources: | ||
requests: | ||
storage: 20Gi |