diff --git a/06_gpu_and_ml/blender/blender_video.py b/06_gpu_and_ml/blender/blender_video.py index d19fc0869..2571437e9 100644 --- a/06_gpu_and_ml/blender/blender_video.py +++ b/06_gpu_and_ml/blender/blender_video.py @@ -68,7 +68,7 @@ # enabling the GPU device. # To do this, we use the `stub.image.run.inside()` context manager. -with stub.image.run_inside(): +with stub.image.imports(): import bpy # NOTE: Blender segfaults if you try to do this after the other imports. diff --git a/06_gpu_and_ml/stable_lm/main.py b/06_gpu_and_ml/stable_lm/main.py index 549934848..61c5cc90a 100644 --- a/06_gpu_and_ml/stable_lm/main.py +++ b/06_gpu_and_ml/stable_lm/main.py @@ -215,7 +215,7 @@ def format_prompt(instruction: str) -> str: return f"<|USER|>{instruction}<|ASSISTANT|>" -with stub.image.run_inside(): +with stub.image.imports(): import uuid import msgspec diff --git a/misc/news_summarizer.py b/misc/news_summarizer.py index 0d54f8afe..a4bcdfa75 100644 --- a/misc/news_summarizer.py +++ b/misc/news_summarizer.py @@ -57,7 +57,7 @@ def fetch_model(local_files_only: bool = False): ) -with scraping_image.run_inside(): +with scraping_image.imports(): import requests from bs4 import BeautifulSoup