drrobot9 commited on
Commit
a373f35
·
verified ·
1 Parent(s): d1d72ea

push updated backend changes

Browse files
Files changed (1) hide show
  1. Dockerfiile +10 -8
Dockerfiile CHANGED
@@ -1,18 +1,20 @@
1
  FROM python:3.10-slim
2
 
3
- # Install dependencies
4
- RUN apt-get update && apt-get install -y git
5
 
 
6
  WORKDIR /app
7
 
8
- # Copy code
9
  COPY . /app
10
 
11
- # Install Python deps
12
- RUN pip install --no-cache-dir -r requirements.txt
 
13
 
14
- # Expose port
15
  EXPOSE 7860
16
 
17
- # Run FastAPI app
18
- CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
 
1
  FROM python:3.10-slim
2
 
3
+ # Install system dependencies
4
+ RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
5
 
6
+ # Set working directory
7
  WORKDIR /app
8
 
9
+ # Copy project files
10
  COPY . /app
11
 
12
+ # Install Python dependencies
13
+ RUN pip install --no-cache-dir --upgrade pip \
14
+ && pip install --no-cache-dir -r requirements.txt
15
 
16
+ # Expose the port Hugging Face Spaces expects
17
  EXPOSE 7860
18
 
19
+ # Run FastAPI with Uvicorn
20
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]