sujoy0011 commited on
Commit
e67d3fa
·
verified ·
1 Parent(s): a0969d9

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +13 -55
Dockerfile CHANGED
@@ -1,63 +1,21 @@
1
- # Use Python 3.13 slim image
2
- FROM python:3.13-slim
3
 
4
- # Set working directory
5
  WORKDIR /app
6
 
7
- # Set environment variables
8
  ENV PYTHONUNBUFFERED=1 \
9
- PYTHONDONTWRITEBYTECODE=1 \
10
- PIP_NO_CACHE_DIR=1 \
11
- PIP_DISABLE_PIP_VERSION_CHECK=1 \
12
- HOME=/app \
13
- WHISPER_CACHE_DIR=/app/.cache/whisper
14
-
15
- # Install system dependencies
16
- RUN apt-get update && apt-get install -y \
17
- gcc \
18
- g++ \
19
- curl \
20
- ffmpeg \
21
- libpq-dev \
22
- git \
23
- && rm -rf /var/lib/apt/lists/*
24
-
25
- # Copy requirements
26
- COPY requirements.txt .
27
 
28
- # Install Python dependencies
29
- RUN pip install --upgrade pip && \
30
- pip install -r requirements.txt
31
 
32
- # Copy application code
33
  COPY . .
34
 
35
- # Create necessary directories with proper permissions
36
- RUN mkdir -p /app/storage/resumes && \
37
- mkdir -p /app/.cache/whisper && \
38
- mkdir -p /app/alembic/versions && \
39
- chmod -R 755 /app/storage && \
40
- chmod -R 755 /app/.cache
41
-
42
- # Create __init__.py files if missing
43
- RUN touch app/__init__.py \
44
- app/api/__init__.py \
45
- app/api/v1/__init__.py \
46
- app/api/v1/endpoints/__init__.py \
47
- app/models/__init__.py \
48
- app/schemas/__init__.py \
49
- app/services/__init__.py \
50
- app/agents/__init__.py \
51
- app/tools/__init__.py \
52
- app/core/__init__.py \
53
- app/utils/__init__.py
54
-
55
- # Expose port
56
- EXPOSE 8000
57
-
58
- # Health check
59
- HEALTHCHECK --interval=30s --timeout=10s --start-period=40s --retries=3 \
60
- CMD curl -f http://localhost:8000/health || exit 1
61
-
62
- # Run the application
63
- CMD ["python", "run.py"]
 
1
+ FROM python:3.11-slim
 
2
 
 
3
  WORKDIR /app
4
 
 
5
  ENV PYTHONUNBUFFERED=1 \
6
+ DISABLE_WHISPER=true \
7
+ PORT=7860
8
+
9
+ RUN apt-get update && apt-get install -y curl libpq-dev && \
10
+ rm -rf /var/lib/apt/lists/*
 
 
 
 
 
 
 
 
 
 
 
 
 
11
 
12
+ COPY requirements.txt .
13
+ RUN pip install --no-cache-dir -r requirements.txt
 
14
 
 
15
  COPY . .
16
 
17
+ RUN mkdir -p /app/storage && chmod -R 777 /app/storage
18
+
19
+ EXPOSE 7860
20
+
21
+ CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860", "--workers", "1"]