Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +6 -6
Dockerfile
CHANGED
@@ -2,15 +2,15 @@ FROM python:3.10-slim
|
|
2 |
|
3 |
WORKDIR /app
|
4 |
|
5 |
-
# Install
|
6 |
-
RUN apt-get update && apt-get install -y git wget
|
7 |
-
|
8 |
COPY requirements.txt .
|
9 |
RUN pip install --no-cache-dir -r requirements.txt
|
10 |
|
11 |
-
#
|
12 |
-
RUN python -c "from sentence_transformers import SentenceTransformer; SentenceTransformer('all-MiniLM-L6-v2')"
|
13 |
-
|
14 |
COPY . .
|
15 |
|
|
|
|
|
|
|
|
|
16 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
2 |
|
3 |
WORKDIR /app
|
4 |
|
5 |
+
# Install dependensi
|
|
|
|
|
6 |
COPY requirements.txt .
|
7 |
RUN pip install --no-cache-dir -r requirements.txt
|
8 |
|
9 |
+
# Salin semua file proyek
|
|
|
|
|
10 |
COPY . .
|
11 |
|
12 |
+
# Pastikan folder cache tersedia
|
13 |
+
RUN mkdir -p /tmp/hf
|
14 |
+
|
15 |
+
# Jalankan FastAPI di port 7860
|
16 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|