Spaces:
Sleeping
Sleeping
FROM python:3.12 | |
# Install FFmpeg and other dependencies | |
RUN apt-get update && \ | |
apt-get install -y ffmpeg && \ | |
apt-get clean && \ | |
rm -rf /var/lib/apt/lists/* | |
# Copy UV tool for Python package installation | |
COPY --from=ghcr.io/astral-sh/uv:0.4.20 /uv /bin/uv | |
# Create user | |
RUN useradd -m -u 1000 user | |
# Set environment variables | |
ENV PATH="/home/user/.local/bin:$PATH" | |
ENV UV_SYSTEM_PYTHON=1 | |
# Set working directory | |
WORKDIR /app | |
# Copy and install requirements | |
COPY --chown=user ./requirements.txt requirements.txt | |
RUN uv pip install -r requirements.txt | |
# Copy application files | |
COPY --chown=user . /app | |
# Switch to non-root user | |
USER user | |
# Run command | |
CMD ["marimo", "-y", "run", "notebook.py", "--include-code", "--host", "0.0.0.0", "--port", "7860"] |