-
Notifications
You must be signed in to change notification settings - Fork 590
/
Copy pathconfig_schema_v1.0.json
203 lines (203 loc) · 7.17 KB
/
config_schema_v1.0.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
{
"$schema": "http://json-schema.org/draft-07/schema",
"type": "object",
"title": "Schema for cog.yaml",
"description": "Defines how to build a Docker image and how to run predictions on your model inside that image.",
"properties": {
"build": {
"$id": "#/properties/build",
"type": "object",
"description": "This stanza describes how to build the Docker image your model runs in.",
"properties": {
"cuda": {
"$id": "#/properties/build/properties/cuda",
"type": "string",
"description": "Cog automatically picks the correct version of CUDA to install, but this lets you override it for whatever reason."
},
"cudnn": {
"$id": "#/properties/build/properties/cudnn",
"type": "string",
"description": "Cog automatically picks the correct version of cuDNN to install, but this lets you override it for whatever reason."
},
"gpu": {
"$id": "#/properties/build/properties/gpu",
"type": "boolean",
"description": "Enable GPUs for this model. When enabled, the [nvidia-docker](https://github.com/NVIDIA/nvidia-docker) base image will be used, and Cog will automatically figure out what versions of CUDA and cuDNN to use based on the version of Python, PyTorch, and Tensorflow that you are using."
},
"python_version": {
"$id": "#/properties/build/properties/python_version",
"type": [
"string",
"number"
],
"description": "The minor (`3.8`) or patch (`3.8.1`) version of Python to use."
},
"python_packages": {
"$id": "#/properties/build/properties/python_packages",
"type": [
"array",
"null"
],
"description": "A list of Python packages to install, in the format `package==version`.",
"additionalItems": true,
"items": {
"$id": "#/properties/build/properties/python_packages/items",
"anyOf": [
{
"$id": "#/properties/build/properties/python_packages/items/anyOf/0",
"type": "string"
}
]
}
},
"pre_install": {
"$id": "#/properties/build/properties/pre_install",
"type": [
"array",
"null"
],
"description": "A list of setup commands to run in the environment before your Python packages are installed.",
"additionalItems": true,
"items": {
"$id": "#/properties/build/properties/pre_install/items",
"anyOf": [
{
"$id": "#/properties/build/properties/pre_install/items/anyOf/0",
"type": "string"
}
]
}
},
"python_requirements": {
"$id": "#/properties/build/properties/python_requirements",
"type": "string",
"description": "A pip requirements file specifying the Python packages to install."
},
"system_packages": {
"$id": "#/properties/build/properties/system_packages",
"type": [
"array",
"null"
],
"description": "A list of Ubuntu APT packages to install.",
"additionalItems": true,
"items": {
"$id": "#/properties/build/properties/system_packages/items",
"anyOf": [
{
"$id": "#/properties/build/properties/system_packages/items/anyOf/0",
"type": "string"
}
]
}
},
"run": {
"$id": "#/properties/build/properties/run",
"type": [
"array",
"null"
],
"description": "A list of setup commands to run in the environment after your system packages and Python packages have been installed. If you're familiar with Docker, it's like a `RUN` instruction in your `Dockerfile`.",
"additionalItems": true,
"items": {
"$id": "#/properties/build/properties/run/items",
"anyOf": [
{
"$id": "#/properties/build/properties/run/items/anyOf/0",
"type": "string"
},
{
"$id": "#/properties/build/properties/run/items/anyOf/1",
"type": "object",
"properties": {
"command": {
"type": "string"
},
"mounts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"secret"
]
},
"id": {
"type": "string"
},
"target": {
"type": "string"
}
},
"required": [
"type",
"id",
"target"
]
}
}
},
"required": [
"command"
]
}
]
}
}
},
"additionalProperties": false
},
"image": {
"$id": "#/properties/image",
"type": "string",
"description": "The name given to built Docker images. If you want to push to a registry, this should also include the registry name."
},
"predict": {
"$id": "#/properties/predict",
"type": "string",
"description": "The pointer to the `Predictor` object in your code, which defines how predictions are run on your model."
},
"train": {
"$id": "#/properties/train",
"type": "string",
"description": "The pointer to the `Predictor` object in your code, which defines how predictions are run on your model."
},
"concurrency": {
"$id": "#/properties/concurrency",
"type": "object",
"description": "The concurrency settings for the model.",
"required": [
"max"
],
"additionalProperties": false,
"properties": {
"max": {
"$id": "#/properties/concurrency/properties/max",
"type": "integer",
"description": "The maximum number of concurrent predictions."
},
"default_target": {
"$id": "#/properties/concurrency/properties/default_target",
"type": "integer",
"description": "The default target for number of concurrent predictions. This setting can be used by an autoscaler to determine when to scale a deployment of a model up or down."
}
}
},
"tests": {
"$id": "#/properties/tests",
"type": [
"array",
"null"
],
"description": "A list of test cog commands to run.",
"additionalItems": false,
"items": {
"type": "object",
"additionalItems": true
}
}
},
"additionalProperties": false
}