Spaces:
Runtime error
Runtime error
uzzam2121 commited on
Commit ·
f1a8bd1
1
Parent(s): fc7db98
Fix model path permission
Browse files
Dockerfile
CHANGED
|
@@ -18,7 +18,7 @@ COPY --chown=user:user src/ /app/repo/
|
|
| 18 |
|
| 19 |
RUN chmod +x /app/repo/deploy/huggingface/entrypoint.sh
|
| 20 |
|
| 21 |
-
ENV MODEL_PATH=/app/model
|
| 22 |
ENV HF_MODEL_REPO=uzzam24/deberta-complexity-lcp
|
| 23 |
ENV APP_ROOT=/app/repo
|
| 24 |
ENV PYTHONPATH=/app/repo:/app/repo/deploy/backend
|
|
|
|
| 18 |
|
| 19 |
RUN chmod +x /app/repo/deploy/huggingface/entrypoint.sh
|
| 20 |
|
| 21 |
+
ENV MODEL_PATH=/app/repo/model
|
| 22 |
ENV HF_MODEL_REPO=uzzam24/deberta-complexity-lcp
|
| 23 |
ENV APP_ROOT=/app/repo
|
| 24 |
ENV PYTHONPATH=/app/repo:/app/repo/deploy/backend
|
src/deploy/backend/app/config.py
CHANGED
|
@@ -17,7 +17,8 @@ def resolve_model_path() -> Path:
|
|
| 17 |
|
| 18 |
candidates = [
|
| 19 |
REPO_ROOT / "model",
|
| 20 |
-
Path("/app/model"),
|
|
|
|
| 21 |
REPO_ROOT / "overnight_bundle" / "exported_models" / "deberta_best",
|
| 22 |
REPO_ROOT / "exported_models" / "deberta_best",
|
| 23 |
Path("/app/overnight_bundle/exported_models/deberta_best"),
|
|
|
|
| 17 |
|
| 18 |
candidates = [
|
| 19 |
REPO_ROOT / "model",
|
| 20 |
+
Path("/app/repo/model"),
|
| 21 |
+
Path("/home/user/model"),
|
| 22 |
REPO_ROOT / "overnight_bundle" / "exported_models" / "deberta_best",
|
| 23 |
REPO_ROOT / "exported_models" / "deberta_best",
|
| 24 |
Path("/app/overnight_bundle/exported_models/deberta_best"),
|
src/deploy/huggingface/download_model.py
CHANGED
|
@@ -15,7 +15,7 @@ from pathlib import Path
|
|
| 15 |
|
| 16 |
def main() -> None:
|
| 17 |
repo = os.environ.get("HF_MODEL_REPO", "").strip()
|
| 18 |
-
target = Path(os.environ.get("MODEL_PATH", "/app/model"))
|
| 19 |
|
| 20 |
if not repo:
|
| 21 |
print("HF_MODEL_REPO not set — expecting model_weights.pt already on disk.")
|
|
|
|
| 15 |
|
| 16 |
def main() -> None:
|
| 17 |
repo = os.environ.get("HF_MODEL_REPO", "").strip()
|
| 18 |
+
target = Path(os.environ.get("MODEL_PATH", "/app/repo/model"))
|
| 19 |
|
| 20 |
if not repo:
|
| 21 |
print("HF_MODEL_REPO not set — expecting model_weights.pt already on disk.")
|