File size: 637 Bytes
7653a86
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7984c5b
7653a86
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# Use a lightweight Python base image
FROM python:3.11-slim

# Set working directory
WORKDIR /app

# Copy requirements file and install Python dependencies with increased timeout
COPY requirements.txt .
RUN pip install --upgrade pip && pip install --timeout=7200 -r requirements.txt

# Copy packages.txt and install system dependencies
COPY packages.txt .
RUN apt-get update && xargs -a packages.txt apt-get install -y && rm -rf /var/lib/apt/lists/*

# Copy application code
COPY . .

# Set environment variables
ENV PYTHONUNBUFFERED=1
ENV CMAKE_BUILD_PARALLEL_LEVEL=$(nproc)

# Command to run your application
# CMD ["python", "app.py"]