added cache env for HF
Browse files- .gitignore +4 -1
- Dockerfile +3 -0
- docker-compose.yml +1 -0
.gitignore
CHANGED
|
@@ -44,4 +44,7 @@ env/
|
|
| 44 |
.Spotlight-V100
|
| 45 |
.Trashes
|
| 46 |
ehthumbs.db
|
| 47 |
-
Thumbs.db
|
|
|
|
|
|
|
|
|
|
|
|
| 44 |
.Spotlight-V100
|
| 45 |
.Trashes
|
| 46 |
ehthumbs.db
|
| 47 |
+
Thumbs.db
|
| 48 |
+
|
| 49 |
+
# Ignore Hugging Face cache directory
|
| 50 |
+
.cache/huggingface/
|
Dockerfile
CHANGED
|
@@ -16,6 +16,9 @@ ENV PORT=7860
|
|
| 16 |
ENV MODEL_PATH="Sparkonix/email-classifier-model"
|
| 17 |
# Replace YOUR_ACTUAL_USERNAME with your Hugging Face username after uploading the model
|
| 18 |
|
|
|
|
|
|
|
|
|
|
| 19 |
# Expose the port
|
| 20 |
EXPOSE 7860
|
| 21 |
|
|
|
|
| 16 |
ENV MODEL_PATH="Sparkonix/email-classifier-model"
|
| 17 |
# Replace YOUR_ACTUAL_USERNAME with your Hugging Face username after uploading the model
|
| 18 |
|
| 19 |
+
# Add this line to set cache location to a writable directory
|
| 20 |
+
ENV HF_HOME="/app/.cache/huggingface"
|
| 21 |
+
|
| 22 |
# Expose the port
|
| 23 |
EXPOSE 7860
|
| 24 |
|
docker-compose.yml
CHANGED
|
@@ -9,4 +9,5 @@ services:
|
|
| 9 |
- .:/app
|
| 10 |
environment:
|
| 11 |
- PORT=7860
|
|
|
|
| 12 |
restart: unless-stopped
|
|
|
|
| 9 |
- .:/app
|
| 10 |
environment:
|
| 11 |
- PORT=7860
|
| 12 |
+
- HF_HOME=/app/.cache/huggingface
|
| 13 |
restart: unless-stopped
|