Download Dockerfile from sid22669/Check_2: direct link, hf CLI and curl.
- Browser
- Download file 761 Bytes
-
https://huggingface.co/spaces/sid22669/Check_2/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/sid22669/Check_2/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/sid22669/Check_2/resolve/main/Dockerfile
761 Bytes
| # Use an official Python runtime as the base image | |
| FROM python:3.9-slim | |
| # Set the working directory in the container | |
| WORKDIR /app | |
| # Copy the application files to the container | |
| COPY app.py . | |
| COPY templates/ ./templates/ | |
| COPY model.pkl . | |
| COPY vectorizer.pkl . | |
| # Copy the requirements file and install dependencies | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Download NLTK data (stopwords, punkt) to a specific directory | |
| RUN mkdir -p /app/nltk_data && \ | |
| python3 -m nltk.downloader -d /app/nltk_data stopwords punkt | |
| # Set the NLTK_DATA environment variable to use the downloaded data | |
| ENV NLTK_DATA=/app/nltk_data | |
| # Expose the port the app will run on | |
| EXPOSE 7860 | |
| # Command to run the application | |
| CMD ["python", "app.py"] | |