Spaces:
Sleeping
Sleeping
AKIRA
commited on
Commit
·
ea05603
1
Parent(s):
1f4061f
Fix: Move HF_HOME env var to Dockerfile for proper initialization
Browse files- Dockerfile +2 -0
- app.py +0 -1
Dockerfile
CHANGED
@@ -2,6 +2,8 @@ FROM python:3.10-slim
|
|
2 |
|
3 |
WORKDIR /app
|
4 |
|
|
|
|
|
5 |
COPY requirements.txt .
|
6 |
RUN pip install --no-cache-dir -r requirements.txt
|
7 |
|
|
|
2 |
|
3 |
WORKDIR /app
|
4 |
|
5 |
+
ENV HF_HOME=/app/.cache
|
6 |
+
|
7 |
COPY requirements.txt .
|
8 |
RUN pip install --no-cache-dir -r requirements.txt
|
9 |
|
app.py
CHANGED
@@ -2,7 +2,6 @@ from transformers import AutoProcessor
|
|
2 |
from optimum.onnxruntime import ORTModelForSpeechSeq2Seq
|
3 |
import torch
|
4 |
import os
|
5 |
-
os.environ['HF_HOME'] = '/app/.cache'
|
6 |
import base64
|
7 |
import tempfile
|
8 |
from fastapi import FastAPI, Request
|
|
|
2 |
from optimum.onnxruntime import ORTModelForSpeechSeq2Seq
|
3 |
import torch
|
4 |
import os
|
|
|
5 |
import base64
|
6 |
import tempfile
|
7 |
from fastapi import FastAPI, Request
|