File size: 909 Bytes
d53dc44 | 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 | # Use an official Python runtime as a parent image
FROM python:3.11-slim
# Set environment variables
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
DEBIAN_FRONTEND=noninteractive \
TZ=Asia/Kolkata
# Set work directory
WORKDIR /app
# Install system dependencies (needed for building some python packages and timezone)
RUN apt-get update && apt-get install -y \
build-essential \
curl \
tzdata \
libgomp1 \
&& ln -fs /usr/share/zoneinfo/$TZ /etc/localtime && dpkg-reconfigure -f noninteractive tzdata \
&& rm -rf /var/lib/apt/lists/*
# Install Python dependencies
COPY requirements.txt /app/
# Standard pip install torch will fetch the aarch64 (ARM) CPU wheel automatically
RUN pip install --no-cache-dir -r requirements.txt
# Copy the project files
COPY . /app/
# Expose the dashboard port
EXPOSE 5000
# Command to run the application
CMD ["python", "main.py"]
|