File size: 732 Bytes
f3352b5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0f56e7e
f3352b5
 
 
 
b161b58
0f56e7e
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
# Base image with Python
FROM python:3.11-slim

# Set environment variables
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1

# Set working directory
WORKDIR /app

# Copy the requirements file
COPY requirements.txt /app/

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



# Install system dependencies
RUN apt-get update && apt-get install -y \
    gcc \
    libgomp1 \
    && apt-get clean \
    && rm -rf /var/lib/apt/lists/*

# Copy the application code
COPY . /app/



# Expose the port
EXPOSE 780

ENV FLASK_APP app.py
ENV FLASK_RUN_HOST 0.0.0.0

# Start the application with gunicorn
CMD ["gunicorn", "--bind", "0.0.0.0:7860", "app:app"]