Shakeel401 commited on
Commit
78e80ec
·
verified ·
1 Parent(s): 6fe0ad6

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -10
Dockerfile CHANGED
@@ -1,13 +1,13 @@
1
  # Use official lightweight Python image
2
  FROM python:3.11-slim
3
 
4
- # Create a working directory
5
  WORKDIR /app
6
 
7
- # Copy project files
8
  COPY . /app
9
 
10
- # Install system dependencies
11
  RUN apt-get update && apt-get install -y --no-install-recommends \
12
  build-essential \
13
  sqlite3 \
@@ -16,13 +16,11 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
16
  # Install Python dependencies
17
  RUN pip install --no-cache-dir -r requirements.txt
18
 
19
- # Hugging Face Spaces port
20
- EXPOSE 7860
21
-
22
- # Ensure /tmp exists for KB + SQLite sessions
23
- RUN mkdir -p /tmp/sessions
24
-
25
  ENV PORT=7860
26
 
27
- # Run the FastAPI app
 
 
 
28
  CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
 
1
  # Use official lightweight Python image
2
  FROM python:3.11-slim
3
 
4
+ # Create working directory
5
  WORKDIR /app
6
 
7
+ # Copy project
8
  COPY . /app
9
 
10
+ # Install OS packages
11
  RUN apt-get update && apt-get install -y --no-install-recommends \
12
  build-essential \
13
  sqlite3 \
 
16
  # Install Python dependencies
17
  RUN pip install --no-cache-dir -r requirements.txt
18
 
19
+ # Hugging Face Spaces runtime port
 
 
 
 
 
20
  ENV PORT=7860
21
 
22
+ # Expose port (not required on Spaces but okay)
23
+ EXPOSE 7860
24
+
25
+ # Start FastAPI
26
  CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]