File size: 941 Bytes
40bf6c0
 
59d2d71
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
40bf6c0
 
59d2d71
 
40bf6c0
 
59d2d71
 
 
 
3e02747
40bf6c0
59d2d71
40bf6c0
59d2d71
 
 
 
 
 
 
 
 
 
 
 
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
43
44
45
46
47
FROM python:3.10-slim

# Install necessary system packages
RUN apt-get update && apt-get install -y \
    libgl1 \
    libglib2.0-0 \
    wget \
    unzip \
 && rm -rf /var/lib/apt/lists/*

# Optional: install ngrok if using flask-ngrok
RUN wget https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip && \
    unzip ngrok-stable-linux-amd64.zip -d /usr/local/bin && \
    chmod +x /usr/local/bin/ngrok && \
    rm ngrok-stable-linux-amd64.zip

# Fix for matplotlib permission issue
ENV MPLCONFIGDIR=/tmp/matplotlib

# Set working directory
WORKDIR /app

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

# Copy app code
COPY . .

# Expose the Flask port
EXPOSE 7860

# Run the app
CMD ["python", "app.py"]


# FROM python:3.10-slim

# WORKDIR /app
# COPY . /app

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

# EXPOSE 7860

# CMD ["python", "app.py"]