File size: 743 Bytes
8e66145
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
FROM python:3.13-slim

WORKDIR /app

# Copy requirements file
COPY requirements.txt .

# Install dependencies
RUN pip install --no-cache-dir -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

# Copy only the necessary files
COPY api_mental_health.py .
COPY .env.example .env
COPY create_vector_db.py .
COPY mental_health_model_artifacts/ mental_health_model_artifacts/

# Expose the port Hugging Face Spaces expects
EXPOSE 7860

# Command to run the application
CMD ["uvicorn", "api_mental_health:app", "--host", "0.0.0.0", "--port", "7860"]