File size: 797 Bytes
b627819
 
 
 
 
0537e12
 
 
 
b627819
 
 
0537e12
b627819
 
 
 
 
f51532a
 
 
50ee429
 
 
 
 
 
b627819
8a16774
ef23e04
f51532a
f8ad888
 
8a16774
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.12-slim

WORKDIR /app

# Install system dependencies
RUN apt-get update && \
    apt-get install -y build-essential git && \
    apt-get install -y libxrender1 libxext6 && \
    apt-get clean

# Copy requirements first to leverage Docker cache
COPY requirements.txt .
RUN pip install --upgrade pip
RUN pip install --no-cache-dir -r requirements.txt

# Copy application code
COPY . .

# Create necessary directories with proper permissions
RUN mkdir -p uploads md_files && \
    chmod 777 uploads && \
    chmod 755 md_files && \
    mkdir -p /tmp/matplotlib && \
    chmod 777 /tmp/matplotlib

# Set matplotlib config directory
ENV MPLCONFIGDIR=/tmp/matplotlib

EXPOSE 7860

# Default command
# CMD ["gunicorn", "--config", "gunicorn_config.py", "app:app"]
CMD ["python", "app.py"]