File size: 1,263 Bytes
88da18c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# 1. Use your exact requested Python version
FROM python:3.13.4-slim

# 2. Set environment variables
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
ENV PORT=7860

# 3. Set the working directory
WORKDIR /app

# 4. Install OS-level dependencies
# (REMOVED Chromium! Just keeping the essentials needed to compile Python 3.13 packages)
RUN apt-get update && apt-get install -y \
    build-essential \
    wget \
    curl \
    && rm -rf /var/lib/apt/lists/*

# 5. Copy the requirements file
COPY f_requirements.txt .

# 6. Install Python dependencies
# Selenium will install here as a harmless "dummy" library since it's never called.
RUN pip install --upgrade pip && \
    pip install --no-cache-dir -r f_requirements.txt

# 7. Download required NLTK data for the CV Analyzer fallback
RUN python -c "import nltk; nltk.download('stopwords'); nltk.download('punkt'); nltk.download('punkt_tab')"

# 8. Copy the entire jumbled repository into the container
COPY . .

# 9. Create runtime directories and grant write permissions
RUN mkdir -p .runtime/uploads/cvs .runtime/uploads/jobs .runtime/uploads/session_state && \
    chmod -R 777 .runtime

# 10. Expose the Hugging Face port
EXPOSE 7860

# 11. Run your React-compatible Flask app
CMD ["python", "app_new.py"]