Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +0 -7
Dockerfile
CHANGED
@@ -1,24 +1,17 @@
|
|
1 |
FROM python:3.11-slim
|
2 |
|
3 |
-
# Install dependencies
|
4 |
COPY requirements.txt .
|
5 |
RUN pip install --no-cache-dir -r requirements.txt
|
6 |
|
7 |
-
# Install sentencepiece explicitly to fix tokenizer error
|
8 |
RUN pip install --no-cache-dir sentencepiece
|
9 |
|
10 |
-
# Ensure consistent sklearn version
|
11 |
RUN pip install --no-cache-dir scikit-learn==1.6.1
|
12 |
|
13 |
-
# Set Hugging Face cache directory to avoid permission issues
|
14 |
ENV TRANSFORMERS_CACHE=/tmp/huggingface
|
15 |
|
16 |
-
# Copy application code
|
17 |
COPY . /app
|
18 |
WORKDIR /app
|
19 |
|
20 |
-
# Expose the port for FastAPI
|
21 |
EXPOSE 7860
|
22 |
|
23 |
-
# Run the FastAPI app using uvicorn
|
24 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
1 |
FROM python:3.11-slim
|
2 |
|
|
|
3 |
COPY requirements.txt .
|
4 |
RUN pip install --no-cache-dir -r requirements.txt
|
5 |
|
|
|
6 |
RUN pip install --no-cache-dir sentencepiece
|
7 |
|
|
|
8 |
RUN pip install --no-cache-dir scikit-learn==1.6.1
|
9 |
|
|
|
10 |
ENV TRANSFORMERS_CACHE=/tmp/huggingface
|
11 |
|
|
|
12 |
COPY . /app
|
13 |
WORKDIR /app
|
14 |
|
|
|
15 |
EXPOSE 7860
|
16 |
|
|
|
17 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|