skimlit / Dockerfile
prosekutor's picture
chore: create dockerfile
7b824f6 verified
Raw History Blame Contribute Delete
770 Bytes
# Base image used by Hugging Face Spaces
FROM python:3.10-slim
# Set environment variables
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
PIP_NO_CACHE_DIR=1
# Install system dependencies (mimics packages.txt)
RUN apt-get update && apt-get install -y --no-install-recommends \
git \
ffmpeg \
libsm6 \
libxext6 \
&& rm -rf /var/lib/apt/lists/*
# Set working directory
WORKDIR /app
# Copy dependency files first (better caching)
COPY requirements.txt /app/
# Install Python dependencies
RUN pip install --upgrade pip \
&& pip install -r requirements.txt
# Copy app files
COPY . /app
# Expose the port (HF Spaces expects 7860 by default)
EXPOSE 7860
# Default command (can be overridden in `Dockerfile`)
CMD ["python", "app.py"]