# Use the official Python image from the Docker Hub FROM python:3.9-slim # Set the working directory in the container WORKDIR ./app # Copy the requirements.txt file into the container COPY requirements.txt . RUN mkdir -p /home/user/nltk_data && chmod a+rwx /home/user/nltk_data # Install the required packages RUN pip install --no-cache-dir -r requirements.txt # Install additional packages if needed RUN pip install matplotlib # Copy the rest of your application code into the container COPY . . # Download NLTK resources RUN python -m nltk.downloader punkt vader_lexicon stopwords # Command to run your application CMD ["python", "app.py"]