Spaces:
Sleeping
Sleeping
Commit
·
f82e0a6
1
Parent(s):
3bd0a86
adjusted the dockerfile to make it work with nltk
Browse files- Dockerfile +6 -0
Dockerfile
CHANGED
|
@@ -22,10 +22,16 @@ COPY requirements.txt .
|
|
| 22 |
# Upgrade pip and install Python dependencies
|
| 23 |
RUN pip install --upgrade pip
|
| 24 |
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
|
|
|
|
|
|
| 25 |
|
| 26 |
# Copy application code
|
| 27 |
COPY . .
|
| 28 |
|
|
|
|
|
|
|
|
|
|
| 29 |
# Expose port for FastAPI / Hugging Face Spaces
|
| 30 |
EXPOSE 7860
|
| 31 |
|
|
|
|
| 22 |
# Upgrade pip and install Python dependencies
|
| 23 |
RUN pip install --upgrade pip
|
| 24 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 25 |
+
# Pre-download NLTK resources
|
| 26 |
+
RUN python -m nltk.downloader punkt_tab
|
| 27 |
+
|
| 28 |
|
| 29 |
# Copy application code
|
| 30 |
COPY . .
|
| 31 |
|
| 32 |
+
# Tell NLTK where to find resources at runtime
|
| 33 |
+
ENV NLTK_DATA=/usr/local/nltk_data
|
| 34 |
+
|
| 35 |
# Expose port for FastAPI / Hugging Face Spaces
|
| 36 |
EXPOSE 7860
|
| 37 |
|