| |
| FROM python:3.10-slim |
|
|
| |
| WORKDIR /app |
|
|
| |
| RUN echo "Installing system dependencies..." && \ |
| apt-get update && apt-get install -y \ |
| build-essential \ |
| && rm -rf /var/lib/apt/lists/* && \ |
| echo "System dependencies installed successfully!" |
|
|
| |
| RUN mkdir -p /nltk_data && \ |
| chmod 777 /nltk_data |
|
|
| |
| COPY . . |
| RUN echo "Application files copied successfully!" |
|
|
| |
| RUN echo "Installing Python dependencies..." && \ |
| pip install --no-cache-dir -r requirements.txt && \ |
| echo "Python dependencies installed successfully!" |
|
|
| |
| RUN python -c "import nltk; nltk.download('averaged_perceptron_tagger_eng', quiet=True)" |
|
|
| |
| EXPOSE 7860 |
|
|
| |
| RUN echo "Contents of working directory:" && ls -la |
|
|
| |
| CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"] |