drrobot9 commited on
Commit
f014f04
·
verified ·
1 Parent(s): a8a051e

push updated backend changes

Browse files
Files changed (1) hide show
  1. Dockerfiile +7 -20
Dockerfiile CHANGED
@@ -1,31 +1,18 @@
1
- # Base image
2
  FROM python:3.10-slim
3
 
4
- # Prevent Python from writing pyc files & buffering stdout
5
- ENV PYTHONDONTWRITEBYTECODE=1
6
- ENV PYTHONUNBUFFERED=1
7
 
8
- # Set working directory
9
  WORKDIR /app
10
 
11
- # Install system dependencies (important for some Python libs)
12
- RUN apt-get update && apt-get install -y \
13
- build-essential \
14
- git \
15
- && rm -rf /var/lib/apt/lists/*
16
-
17
- # Copy dependency file first (better caching)
18
- COPY requirements.txt /app/
19
 
20
- # Install dependencies
21
  RUN pip install --no-cache-dir -r requirements.txt
22
 
23
- # Copy the rest of the project
24
- COPY . /app
25
-
26
- # Expose port for FastAPI
27
  EXPOSE 7860
28
 
29
- # Start FastAPI with Uvicorn
30
- # (replace main:app with the actual filename:FastAPI instance)
31
  CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
 
 
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"]