File size: 821 Bytes
eaa0dd6
4e3d16d
 
eaa0dd6
 
 
4e3d16d
 
eaa0dd6
 
128728a
eaa0dd6
 
 
 
b50c572
eaa0dd6
 
8005bb9
b50c572
8005bb9
eaa0dd6
 
 
 
 
128728a
eaa0dd6
8005bb9
 
eaa0dd6
4e3d16d
 
eaa0dd6
 
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
FROM python:3.10-slim

# Install system dependencies
RUN apt-get update && \
    apt-get install -y --no-install-recommends \
    curl \
    && rm -rf /var/lib/apt/lists/*

# Set working directory
WORKDIR /app

# Set environment variables
ENV PYTHONUNBUFFERED=1 \
    PYTHONDONTWRITEBYTECODE=1 \
    UPLOAD_FOLDER=/tmp/pdf_uploads \
    OUTPUT_FOLDER=/tmp/pdf_output

# Create necessary directories and set permissions
RUN mkdir -p /tmp/pdf_uploads /tmp/pdf_output \
    && chmod -R 777 /tmp/pdf_uploads /tmp/pdf_output

# Copy requirements and app files
COPY requirements.txt /app/
COPY *.py /app/
COPY entrypoint.sh /app/
RUN chmod +x /app/entrypoint.sh

# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt

# Expose port
EXPOSE 7860

# Set the entrypoint
ENTRYPOINT ["/app/entrypoint.sh"]