akshayka commited on
Commit
08499ca
·
verified ·
1 Parent(s): f543ed6

Add ffmpeg

Browse files
Files changed (1) hide show
  1. Dockerfile +18 -1
Dockerfile CHANGED
@@ -1,16 +1,33 @@
1
  FROM python:3.12
 
 
 
 
 
 
 
 
2
  COPY --from=ghcr.io/astral-sh/uv:0.4.20 /uv /bin/uv
3
 
 
4
  RUN useradd -m -u 1000 user
 
 
5
  ENV PATH="/home/user/.local/bin:$PATH"
6
  ENV UV_SYSTEM_PYTHON=1
7
 
 
8
  WORKDIR /app
9
 
 
10
  COPY --chown=user ./requirements.txt requirements.txt
11
  RUN uv pip install -r requirements.txt
12
 
 
13
  COPY --chown=user . /app
 
 
14
  USER user
15
 
16
- CMD ["marimo", "-y", "run", "notebook.py", "--include-code", "--host", "0.0.0.0", "--port", "7860"]
 
 
1
  FROM python:3.12
2
+
3
+ # Install FFmpeg and other dependencies
4
+ RUN apt-get update && \
5
+ apt-get install -y ffmpeg && \
6
+ apt-get clean && \
7
+ rm -rf /var/lib/apt/lists/*
8
+
9
+ # Copy UV tool for Python package installation
10
  COPY --from=ghcr.io/astral-sh/uv:0.4.20 /uv /bin/uv
11
 
12
+ # Create user
13
  RUN useradd -m -u 1000 user
14
+
15
+ # Set environment variables
16
  ENV PATH="/home/user/.local/bin:$PATH"
17
  ENV UV_SYSTEM_PYTHON=1
18
 
19
+ # Set working directory
20
  WORKDIR /app
21
 
22
+ # Copy and install requirements
23
  COPY --chown=user ./requirements.txt requirements.txt
24
  RUN uv pip install -r requirements.txt
25
 
26
+ # Copy application files
27
  COPY --chown=user . /app
28
+
29
+ # Switch to non-root user
30
  USER user
31
 
32
+ # Run command
33
+ CMD ["marimo", "-y", "run", "notebook.py", "--include-code", "--host", "0.0.0.0", "--port", "7860"]