File size: 751 Bytes
5d68747
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# Start from a slim Python 3.10 base image
FROM python:3.10-slim

# Set the working directory inside the container
WORKDIR /app

# Copy the requirements file first to leverage Docker cache
COPY requirements.txt .

# Install the Python dependencies
# --no-cache-dir saves space
RUN pip install --no-cache-dir -r requirements.txt

# Copy the rest of the application files
# This includes app.py AND your model folder (bert-indian-legal-intent)
COPY . .

# Hugging Face Spaces *requires* the app to run on port 7860
EXPOSE 7860

# Command to run the FastAPI server using uvicorn
# 0.0.0.0 makes it accessible outside the container
# app:app refers to the 'app' object in the 'app.py' file
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]