| | FROM python:3.10-slim |
| |
|
| | ENV PYTHONUNBUFFERED=1 |
| |
|
| | RUN apt-get update && \ |
| | apt-get install -y --no-install-recommends ffmpeg && \ |
| | apt-get clean && \ |
| | rm -rf /var/lib/apt/lists/* |
| |
|
| | ARG APP_USER_UID=1000 |
| | ARG APP_USER_GID=1000 |
| | RUN groupadd --gid $APP_USER_GID appgroup && \ |
| | useradd --uid $APP_USER_UID --gid appgroup --shell /bin/bash --create-home appuser |
| |
|
| | WORKDIR /home/appuser/app |
| |
|
| | RUN pip install --no-cache-dir --upgrade pip |
| | RUN pip install --no-cache-dir streamlit moviepy |
| |
|
| | COPY test_app.py . |
| |
|
| | RUN chown -R appuser:appgroup /home/appuser/app |
| | USER appuser |
| |
|
| | EXPOSE 8501 |
| | CMD ["streamlit", "run", "test_app.py", "--server.headless=true"] |