Spaces:
Runtime error
Runtime error
File size: 586 Bytes
0d61a38 438acf0 0d61a38 b53cd6b 0d61a38 438acf0 0d61a38 efe1f3b |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
FROM python:3.12.2
# Set environment variables
ENV PYTHONUNBUFFERED=1 \
HF_HOME=/tmp/huggingface_cache \
FLASK_ENV=production \
FLASK_APP=app.py \
PORT=5003
# Set working directory in container
WORKDIR /app
# Copy the current directory contents into the container
COPY . .
# Install dependencies
RUN pip install -r requirements.txt
# Preload NLTK data
RUN python -m nltk.downloader punkt punkt_tab -d /tmp/nltk_data
# Expose the port the app runs on
EXPOSE 5003
# Run the Flask app
CMD ["gunicorn", "app:app", "--bind", "0.0.0.0:5000"]
# CMD ["python", "app.py"] |