SpamDetectorCustom / Dockerfile
shreyankisiri's picture
Update Dockerfile
bd0eacb verified
raw
history blame contribute delete
400 Bytes
FROM python:3.9-slim
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Set up NLTK data path
ENV NLTK_DATA="/app/nltk_data"
# Create the nltk_data directory & download necessary resources
RUN mkdir -p $NLTK_DATA && \
python -m nltk.downloader -d $NLTK_DATA stopwords wordnet
COPY . .
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]