Merge pull request #172 from hodanov/feature/repair_duplicated_error

Remove Mount.from_local_file() and context_mount.
This commit is contained in:
hodanov 2025-01-19 08:28:27 +09:00 committed by GitHub
commit 744cafb72c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 3 additions and 5 deletions

View File

@ -23,7 +23,7 @@ This is a Diffusers-based script for running Stable Diffusion on [Modal](https:/
The app requires the following to run:
- python: >= 3.11
- modal: >= 0.64.155
- modal: >= 0.72.20
- A token for Modal.
The `modal` is the Python library. In order to install that:

View File

@ -23,7 +23,7 @@
このスクリプトを実行するには最低限下記のツールが必要です:
- python: >= 3.11
- modal: >= 0.64.155
- modal: >= 0.72.20
- ModalのAPIトークン
- Hagging FaceのAPIトークン非公開のリポジトリのモデルを参照したい場合に必須

View File

@ -4,7 +4,7 @@ from pathlib import Path
import diffusers
from huggingface_hub import login
from modal import App, Image, Mount, Secret
from modal import App, Image, Secret
BASE_CACHE_PATH = "/vol/cache"
BASE_CACHE_PATH_LORA = "/vol/cache/lora"
@ -177,12 +177,10 @@ def build_image() -> None:
app = App("stable-diffusion-cli")
base_stub = Image.from_dockerfile(
path="Dockerfile",
context_mount=Mount.from_local_file("requirements.txt"),
)
app.image = base_stub.dockerfile_commands(
"FROM base",
"COPY config.yml /",
context_mount=Mount.from_local_file("config.yml"),
).run_function(
build_image,
secrets=[Secret.from_dotenv(__file__)],