AI-Solutions-KK commited on
Commit
f6a8ffd
·
1 Parent(s): 6709e9b

docker modified

Browse files
Files changed (1) hide show
  1. Dockerfile +18 -7
Dockerfile CHANGED
@@ -1,23 +1,34 @@
 
 
 
 
 
1
  FROM python:3.10-slim
2
 
3
  WORKDIR /app
4
 
5
- # 1. Install system-level dependencies for Image processing and Voice
6
  RUN apt-get update && apt-get install -y \
7
- libgl1-mesa-glx \
8
  libglib2.0-0 \
 
 
 
 
 
9
  espeak \
10
  && rm -rf /var/lib/apt/lists/*
11
 
12
- # 2. Install Python libraries (Docker creates its own "virtual environment" here)
13
  COPY requirements.txt .
 
 
14
  RUN pip install --no-cache-dir -r requirements.txt
15
 
16
- # 3. Copy your project files (we will ignore .venv using a .dockerignore file)
17
  COPY . .
18
 
19
- # 4. Hugging Face default port
20
  EXPOSE 7860
21
 
22
- # 5. Run your specific launcher script
23
- CMD ["python", "start_server.py"]
 
1
+ # ============================================
2
+ # BACKEND: Dockerfile
3
+ # ============================================
4
+ # HuggingFace Spaces deployment
5
+
6
  FROM python:3.10-slim
7
 
8
  WORKDIR /app
9
 
10
+ # Install system dependencies for OpenCV + Voice
11
  RUN apt-get update && apt-get install -y \
 
12
  libglib2.0-0 \
13
+ libgomp1 \
14
+ libsm6 \
15
+ libxext6 \
16
+ libxrender-dev \
17
+ libgl1 \
18
  espeak \
19
  && rm -rf /var/lib/apt/lists/*
20
 
21
+ # Copy requirements first (for caching)
22
  COPY requirements.txt .
23
+
24
+ # Install Python dependencies
25
  RUN pip install --no-cache-dir -r requirements.txt
26
 
27
+ # Copy all application files
28
  COPY . .
29
 
30
+ # Expose port
31
  EXPOSE 7860
32
 
33
+ # Run FastAPI with uvicorn
34
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]