custom run launcher for custom docker image
This commit is contained in:
@@ -109,11 +109,3 @@ def daily_html() -> str: ...
|
||||
|
||||
class MyAssetConfig(dg.Config):
|
||||
image: str = "bla"
|
||||
|
||||
|
||||
@asset(metadata={"docker_image": "my-other-image:latest"})
|
||||
def my_asset(context: dg.AssetExecutionContext, config: MyAssetConfig) -> None:
|
||||
ic(context.op_config)
|
||||
ic(config)
|
||||
# image = context.op_config.image
|
||||
# context.log.info(f"This asset wants to use Docker image: {image}")
|
||||
|
||||
@@ -22,6 +22,6 @@ definitions = dg.Definitions(
|
||||
"html_io_manager": HtmlIOManager(base_dir=STORAGE_DIR),
|
||||
"polars_parquet_io_manager": PolarsParquetIOManager(base_dir=STORAGE_DIR),
|
||||
},
|
||||
jobs=[jobs.test_job],
|
||||
jobs=[jobs.raw_html_job],
|
||||
sensors=[sensors.check_update],
|
||||
)
|
||||
|
||||
@@ -2,10 +2,8 @@ import assets
|
||||
|
||||
import dagster as dg
|
||||
|
||||
raw_html_job = dg.define_asset_job("deals_job", selection=[assets.raw_html.key])
|
||||
|
||||
test_job = dg.define_asset_job(
|
||||
"my_asset_job",
|
||||
selection=[assets.my_asset.key],
|
||||
tags={"docker/image": "my.registry/image:from-config"},
|
||||
raw_html_job = dg.define_asset_job(
|
||||
"raw_html_job",
|
||||
selection=[assets.raw_html.key],
|
||||
tags={"docker/image": "dagster-code-stocks-playwright"},
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user