Coin_Detection / Dockerfile
muhammadhamza-stack
update dockerfile
bb9a613
raw
history blame contribute delete
696 Bytes
# HF Spaces compatible base image
FROM python:3.9-slim
# Prevent Python from writing .pyc files
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
# Set working directory
WORKDIR /app
# System dependencies (safe defaults)
RUN apt-get update && apt-get install -y \
libgl1 \
libglib2.0-0 \
git \
curl \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements first (better Docker caching)
COPY requirements.txt .
# Upgrade pip and install dependencies
RUN pip install --upgrade pip \
&& pip install --no-cache-dir -r requirements.txt
# Copy the rest of the application
COPY . .
# Hugging Face Spaces uses port 7860
EXPOSE 7860
# Start the app
CMD ["python", "app.py"]