Badhri-Prasath-D-R commited on
Commit
3f7f0b6
·
1 Parent(s): bbbd9d2

Corrected Dockerfile paths for root deployment

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -12
Dockerfile CHANGED
@@ -1,23 +1,20 @@
1
- # Use a Python base image
2
  FROM python:3.10-slim
3
 
4
- # Set the working directory inside the container
5
  WORKDIR /app
6
 
7
- # Install system dependencies for SQLite
8
- RUN apt-get update && apt-get install -y build-essential
9
 
10
- # Copy and install Python requirements
11
- COPY Backend/requirements.txt .
12
  RUN pip install --no-cache-dir -r requirements.txt
13
 
14
- # Copy the rest of your backend code and your Database folder
15
- COPY Backend/ .
16
 
17
- # Set the port and run the app
18
  ENV PORT=7860
19
  EXPOSE 7860
20
 
21
- CMD ["python", "main.py"]
22
-
23
- ENV PYTHONUNBUFFERED=1
 
 
1
  FROM python:3.10-slim
2
 
 
3
  WORKDIR /app
4
 
5
+ # Install system dependencies
6
+ RUN apt-get update && apt-get install -y build-essential && rm -rf /var/lib/apt/lists/*
7
 
8
+ # Copy requirements from the ROOT of your project
9
+ COPY requirements.txt .
10
  RUN pip install --no-cache-dir -r requirements.txt
11
 
12
+ # Copy everything else from the current folder (main.py, Database, etc.)
13
+ COPY . .
14
 
15
+ # Hugging Face defaults to 7860
16
  ENV PORT=7860
17
  EXPOSE 7860
18
 
19
+ # Ensure the command points to the main script
20
+ CMD ["python", "main.py"]