CoolFace
Apppublic

PalDPathak/Smart-Traffic-openenv

sourceHugging Faceupdated 6mo agoView on Hugging Face
0likes
Dockerfile26 linesDownload Raw Back to root
1FROM python:3.11-slim2 3# Copy uv from its official image for blazing-fast installs4COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/5 6# Set up a new user 'user' with UID 1000 (Required for Hugging Face Spaces)7RUN useradd -m -u 1000 user8USER user9ENV HOME=/home/user \10    PATH=/home/user/.local/bin:$PATH11 12WORKDIR $HOME/app13 14# Copy requirements file first to maximize Docker layer caching15COPY --chown=user requirements.txt .16 17# Use standard pip to install packages reliably18RUN pip install --no-cache-dir -r requirements.txt19 20# Copy the rest of the application with proper ownership21COPY --chown=user . $HOME/app22 23EXPOSE 786024 25CMD ["python", "app.py"]26