Spaces:
Sleeping
Sleeping
File size: 906 Bytes
8242927 8e66145 6ca0914 8e66145 8242927 8e66145 8242927 8e66145 6ca0914 8e66145 8242927 8e66145 8242927 8e66145 6ca0914 |
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 32 33 34 |
FROM python:3.9-slim
WORKDIR /app
# Install git and git-lfs for downloading large files (if needed)
RUN apt-get update && \
apt-get install -y git git-lfs build-essential && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Copy requirements file
COPY requirements.txt .
# Install dependencies
RUN pip install --no-cache-dir --upgrade -r requirements.txt
# Download NLTK data
RUN python -c "import nltk; nltk.download('punkt'); nltk.download('wordnet'); nltk.download('stopwords')"
# Create necessary directories
RUN mkdir -p data/users data/sessions data/conversations data/feedback
RUN mkdir -p mental_health_model_artifacts/chroma_db
# Copy application files
COPY app.py .
COPY .env.example .env
COPY api_mental_health.py .
# Expose the port Hugging Face Spaces expects
EXPOSE 7860
# Command to run the application
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|