Spaces:
Sleeping
Sleeping
Upload Dockerfile
Browse files- Dockerfile +5 -0
Dockerfile
CHANGED
|
@@ -15,6 +15,9 @@ COPY app.py .
|
|
| 15 |
# Install Python packages
|
| 16 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 17 |
|
|
|
|
|
|
|
|
|
|
| 18 |
# Expose port
|
| 19 |
EXPOSE 7860
|
| 20 |
|
|
@@ -24,6 +27,8 @@ ENV PORT=7860
|
|
| 24 |
ENV HF_HOME=/tmp/.cache/huggingface
|
| 25 |
ENV TRANSFORMERS_CACHE=/tmp/.cache/huggingface
|
| 26 |
ENV DATABASE_URL=sqlite:////tmp/medicare_agent.db
|
|
|
|
|
|
|
| 27 |
|
| 28 |
# Run
|
| 29 |
CMD ["python", "app.py"]
|
|
|
|
| 15 |
# Install Python packages
|
| 16 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 17 |
|
| 18 |
+
# Download spaCy model during build (not at runtime)
|
| 19 |
+
RUN pip install --no-cache-dir https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-3.8.0/en_core_web_sm-3.8.0-py3-none-any.whl
|
| 20 |
+
|
| 21 |
# Expose port
|
| 22 |
EXPOSE 7860
|
| 23 |
|
|
|
|
| 27 |
ENV HF_HOME=/tmp/.cache/huggingface
|
| 28 |
ENV TRANSFORMERS_CACHE=/tmp/.cache/huggingface
|
| 29 |
ENV DATABASE_URL=sqlite:////tmp/medicare_agent.db
|
| 30 |
+
ENV PYTHONUSERBASE=/tmp/.local
|
| 31 |
+
ENV PIP_CACHE_DIR=/tmp/.cache/pip
|
| 32 |
|
| 33 |
# Run
|
| 34 |
CMD ["python", "app.py"]
|