forked from cporcellijr/abs-kosync-bridge
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
51 lines (40 loc) · 1.43 KB
/
Dockerfile
File metadata and controls
51 lines (40 loc) · 1.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# [START FILE: abs-kosync-enhanced/Dockerfile]
FROM python:3.11-slim
ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \
FLASK_APP=web_server.py \
PYTHONPATH="/app" \
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/lib/python3.11/site-packages/nvidia/cublas/lib:/usr/local/lib/python3.11/site-packages/nvidia/cudnn/lib"
WORKDIR /app
# 1. Install System Dependencies
# FFmpeg with full codec support for audio conversion
RUN apt-get update && \
apt-get install -y --no-install-recommends \
ffmpeg \
libavcodec-extra \
curl \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt /app/requirements.txt
# 2. Install Python Dependencies
ARG INSTALL_GPU=false
RUN pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir -r /app/requirements.txt && \
if [ "$INSTALL_GPU" = "true" ]; then \
pip install --no-cache-dir nvidia-cublas-cu12 nvidia-cudnn-cu12; \
fi
# 3. Create directories
RUN mkdir -p /app/src /app/templates /app/static /data/audio_cache /data/logs /data/transcripts
# 4. Copy Application Code
copy src/ /app/src/
COPY templates/ /app/templates/
COPY static/ /app/static/
COPY alembic/ /app/alembic/
COPY alembic.ini /app/alembic.ini
COPY start.sh /app/start.sh
RUN chmod +x /app/start.sh
EXPOSE 5757
HEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=3 \
CMD curl -f http://localhost:5757/ || exit 1
CMD ["/app/start.sh"]
# [END FILE]