Update Dockerfile
Browse files- Dockerfile +8 -0
Dockerfile
CHANGED
|
@@ -12,6 +12,14 @@ RUN apt-get update && apt-get install -y \
|
|
| 12 |
COPY requirements.txt ./
|
| 13 |
COPY src/ ./src/
|
| 14 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 16 |
|
| 17 |
EXPOSE 8501
|
|
|
|
| 12 |
COPY requirements.txt ./
|
| 13 |
COPY src/ ./src/
|
| 14 |
|
| 15 |
+
# Create local cache dirs and set env for HuggingFace + Streamlit
|
| 16 |
+
ENV HF_HOME=/app/hf_cache
|
| 17 |
+
ENV TRANSFORMERS_CACHE=/app/hf_cache
|
| 18 |
+
ENV XDG_CACHE_HOME=/app/hf_cache
|
| 19 |
+
ENV STREAMLIT_HOME=/app/.streamlit
|
| 20 |
+
|
| 21 |
+
RUN mkdir -p /app/hf_cache /app/.streamlit && chmod -R 777 /app/hf_cache /app/.streamlit
|
| 22 |
+
|
| 23 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 24 |
|
| 25 |
EXPOSE 8501
|