Spaces:
Sleeping
Sleeping
File size: 943 Bytes
7e97ce7 43b2c85 816b706 43b2c85 816b706 7e97ce7 43b2c85 7e97ce7 43b2c85 a20262b 7e97ce7 |
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 29 30 31 |
# Use an official Python runtime as a parent image
FROM python:3.10-slim
# Set the working directory
WORKDIR /app
# Copy the requirements file into the container
COPY requirements.txt /app/requirements.txt
# Install any needed packages specified in requirements.txt
RUN pip install --no-cache-dir -r requirements.txt
# Copy the current directory contents into the container at /app
COPY . /app
# Create the logs and nltk_data directories and set permissions
RUN mkdir -p /app/logs && chmod -R 777 /app/logs
RUN mkdir -p /app/nltk_data && chmod -R 777 /app/nltk_data
# Set the NLTK_DATA environment variable
ENV NLTK_DATA=/app/nltk_data
# Download NLTK data
RUN python -c "import nltk; nltk.download('stopwords', download_dir='/app/nltk_data'); nltk.download('wordnet', download_dir='/app/nltk_data')"
# Make port 7860 available to the world outside this container
EXPOSE 7860
# Run the entrypoint script
CMD ["sh", "./entrypoint.sh"]
|