Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +3 -8
Dockerfile
CHANGED
|
@@ -9,16 +9,11 @@ RUN apt-get update && apt-get install -y build-essential && rm -rf /var/lib/apt/
|
|
| 9 |
COPY requirements.txt .
|
| 10 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 11 |
|
| 12 |
-
# Download Spacy model during build
|
| 13 |
RUN python -m spacy download en_core_web_sm
|
| 14 |
|
| 15 |
-
# Copy
|
| 16 |
COPY . .
|
| 17 |
|
| 18 |
-
#
|
| 19 |
-
RUN mkdir -p /app/cache && chmod 777 /app/cache
|
| 20 |
-
ENV TRANSFORMERS_CACHE=/app/cache
|
| 21 |
-
ENV SENTENCE_TRANSFORMERS_HOME=/app/cache
|
| 22 |
-
|
| 23 |
-
# Start Server
|
| 24 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
|
| 9 |
COPY requirements.txt .
|
| 10 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 11 |
|
| 12 |
+
# Download Spacy model during build to save time
|
| 13 |
RUN python -m spacy download en_core_web_sm
|
| 14 |
|
| 15 |
+
# Copy your code
|
| 16 |
COPY . .
|
| 17 |
|
| 18 |
+
# Hugging Face uses port 7860 by default
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|