File size: 1,001 Bytes
1713970
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
95ff693
1713970
 
95ff693
1713970
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
35
36
37
38
39
40
41
42
43
44
# Backend Dockerfile

FROM python:3.12-slim

WORKDIR /app

# Install backend requirements
COPY requirements.txt .
RUN pip install --upgrade pip && \
    pip install -r requirements.txt

# Copy backend files
COPY Src ./Src
COPY Artifacts ./Artifacts
COPY models ./models/

EXPOSE 7860

# Run FastAPI app using Uvicorn
CMD ["uvicorn", "Src.api.fastapi_app:app", "--host", "0.0.0.0", "--port", "7860"]

# FROM python:3.12-slim

# # Set working directory
# WORKDIR /app

# # Copy requirements and install
# COPY requirements.txt ./requirements.txt
# RUN pip install --no-cache-dir -r requirements.txt

# # Copy the full app
# COPY Frontend ./Frontend
# COPY Src ./Src
# COPY DataBase ./DataBase
# COPY Artifacts ./Artifacts

# # Expose Streamlit port (Hugging Face Spaces requirement)
# EXPOSE 7860

# # Start both FastAPI and Streamlit
# CMD ["bash", "-c", "\
# uvicorn Src.api.fastapi_app:app --host 0.0.0.0 --port 8000 & \
# streamlit run Frontend/App.py --server.port 7860 --server.enableCORS false"]