-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
38 lines (29 loc) · 1.27 KB
/
Copy pathDockerfile
File metadata and controls
38 lines (29 loc) · 1.27 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
# Testify API — slim, runnable-anywhere image (satisfies the hackathon
# "all submissions must be containerized" rule). Runs the full API with the
# Gemma/AMD-endpoint providers, or fully offline in MOCK_MODE with zero config.
#
# Heavy ASR (local Whisper-large-v3) is meant to run on the AMD MI300X pod using
# the ROCm base image — see Dockerfile.rocm.
FROM python:3.12-slim
ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \
PIP_NO_CACHE_DIR=1
# ffmpeg for audio extraction / dual-channel split; nodejs for yt-dlp URL ingest.
RUN apt-get update \
&& apt-get install -y --no-install-recommends ffmpeg nodejs \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY app ./app
COPY fixtures ./fixtures
COPY README.md LICENSE ./
EXPOSE 8000
# Zero-config demo runs offline; set a Gemma key (+ providers) for real runs.
ENV MOCK_MODE=true \
DATA_DIR=/data \
DATABASE_URL=sqlite:////data/testify.db
VOLUME ["/data"]
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
CMD python -c "import urllib.request,sys; sys.exit(0 if urllib.request.urlopen('http://localhost:8000/health').status==200 else 1)"
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]