@@ -4,6 +4,7 @@ version: 3
4
4
vars :
5
5
NBL_PYTHON_VERSION : 3.9
6
6
IDENTIFIER : base
7
+ BUILD_TARGET : main
7
8
8
9
# NOTE: When using `deps: []`, variables are inherited from the current task, but when calling them
9
10
# directly in `cmds: []`, the variables have to be passed in explicitly.
59
60
desc : Build the Python 3.x base image after copying required files
60
61
cmds :
61
62
- task python:base:copy-files IDENTIFIER=base NBL_PYTHON_VERSION={{.NBL_PYTHON_VERSION}}
62
- - task build LANGUAGE=python NBL_LANGUAGE_VERSION={{.NBL_PYTHON_VERSION}} IDENTIFIER=base
63
+ - task build LANGUAGE=python NBL_LANGUAGE_VERSION={{.NBL_PYTHON_VERSION}} IDENTIFIER=base BUILD_TARGET=base
63
64
64
65
# Base GPU image
65
66
base-gpu:lock-dependencies :
@@ -133,8 +134,10 @@ tasks:
133
134
- task python:datascience:build IDENTIFIER=noteable-gpu NBL_PYTHON_VERSION={{.NBL_PYTHON_VERSION}}
134
135
# copy over noteable-specific files
135
136
- task python:noteable:copy-files IDENTIFIER=noteable NBL_PYTHON_VERSION={{.NBL_PYTHON_VERSION}}
137
+ # copy dev_packages for local builds, even if we aren't using the dev stage
138
+ - sudo cp -R python/noteable/dev_packages python/noteable/{{.NBL_PYTHON_VERSION}}/
136
139
# build the noteable image off of the datascience image
137
- - task build LANGUAGE=python NBL_LANGUAGE_VERSION={{.NBL_PYTHON_VERSION}} IDENTIFIER=noteable BUILD_TARGET=main -- --build-context base=docker-image://local/kernel-python-{{.NBL_PYTHON_VERSION}}-datascience:dev
140
+ - task build LANGUAGE=python NBL_LANGUAGE_VERSION={{.NBL_PYTHON_VERSION}} IDENTIFIER=noteable BUILD_TARGET={{.BUILD_TARGET}} -- --build-context base=docker-image://local/kernel-python-{{.NBL_PYTHON_VERSION}}-datascience:dev
138
141
139
142
# Noteable GPU image
140
143
noteable-gpu:lock-dependencies :
@@ -149,8 +152,10 @@ tasks:
149
152
- task python:datascience-gpu:build IDENTIFIER=noteable-gpu NBL_PYTHON_VERSION={{.NBL_PYTHON_VERSION}}
150
153
# copy over noteable-specific files
151
154
- task python:noteable:copy-files IDENTIFIER=noteable NBL_PYTHON_VERSION={{.NBL_PYTHON_VERSION}} FILE_PREFIX="gpu."
155
+ # copy dev_packages for local builds, even if we aren't using the dev stage
156
+ - sudo cp -R python/noteable/gpu_dev_packages python/noteable/{{.NBL_PYTHON_VERSION}}/
152
157
# build the noteable-gpu image off of the datascience-gpu image
153
- - task build LANGUAGE=python NBL_LANGUAGE_VERSION={{.NBL_PYTHON_VERSION}} IDENTIFIER=noteable BUILD_TARGET=gpu TAG_SUFFIX=-gpu -- --build-context base=docker-image://local/kernel-python-{{.NBL_PYTHON_VERSION}}-datascience-gpu:dev
158
+ - task build LANGUAGE=python NBL_LANGUAGE_VERSION={{.NBL_PYTHON_VERSION}} IDENTIFIER=noteable BUILD_TARGET={{.BUILD_TARGET}} TAG_SUFFIX=-gpu -- --build-context base=docker-image://local/kernel-python-{{.NBL_PYTHON_VERSION}}-datascience-gpu:dev
154
159
155
160
# convenience functions for building multiple images in parallel
156
161
base:lock-all-dependencies :
@@ -251,6 +256,18 @@ tasks:
251
256
- task : noteable:build
252
257
vars : { NBL_PYTHON_VERSION: 3.10 }
253
258
259
+ noteable:build-all-with-dev-packages :
260
+ desc : LOCAL DEV - Build all `noteable` images with `dev_packages` included
261
+ deps :
262
+ - task : noteable:build
263
+ vars :
264
+ NBL_PYTHON_VERSION : 3.9
265
+ BUILD_TARGET : dev
266
+ - task : noteable:build
267
+ vars :
268
+ NBL_PYTHON_VERSION : 3.10
269
+ BUILD_TARGET : dev
270
+
254
271
noteable-gpu:lock-all-dependencies :
255
272
desc : Lock Python dependencies for all Python 3.x GPU builds using pip-compile
256
273
deps :
@@ -267,6 +284,18 @@ tasks:
267
284
- task : noteable-gpu:build
268
285
vars : { NBL_PYTHON_VERSION: 3.10 }
269
286
287
+ noteable-gpu:build-all-with-dev-packages :
288
+ desc : LOCAL DEV - Build all `noteable` images with `gpu_dev_packages` included
289
+ deps :
290
+ - task : noteable-gpu:build
291
+ vars :
292
+ NBL_PYTHON_VERSION : 3.9
293
+ BUILD_TARGET : gpu-dev
294
+ - task : noteable-gpu:build
295
+ vars :
296
+ NBL_PYTHON_VERSION : 3.10
297
+ BUILD_TARGET : gpu-dev
298
+
270
299
# convenience functions for building all images
271
300
lock-all-dependencies :
272
301
desc : Lock Python dependencies for all Python 3.x builds using pip-compile
0 commit comments