mgbam commited on
Commit
84489b5
·
verified ·
1 Parent(s): 1c81260

Create Dockerfile.test

Browse files
Files changed (1) hide show
  1. Dockerfile.test +26 -0
Dockerfile.test ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.10-slim
2
+
3
+ ENV PYTHONUNBUFFERED=1
4
+
5
+ RUN apt-get update && \
6
+ apt-get install -y --no-install-recommends ffmpeg && \
7
+ apt-get clean && \
8
+ rm -rf /var/lib/apt/lists/*
9
+
10
+ ARG APP_USER_UID=1000
11
+ ARG APP_USER_GID=1000
12
+ RUN groupadd --gid $APP_USER_GID appgroup && \
13
+ useradd --uid $APP_USER_UID --gid appgroup --shell /bin/bash --create-home appuser
14
+
15
+ WORKDIR /home/appuser/app
16
+
17
+ RUN pip install --no-cache-dir --upgrade pip
18
+ RUN pip install --no-cache-dir streamlit moviepy # Pillow (if TextClip test is uncommented)
19
+
20
+ COPY test_app.py .
21
+
22
+ RUN chown -R appuser:appgroup /home/appuser/app
23
+ USER appuser
24
+
25
+ EXPOSE 8501
26
+ CMD ["streamlit", "run", "test_app.py", "--server.headless=true"]