Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
148 changes: 126 additions & 22 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,22 +1,126 @@
openai-whisper
ollama
gradio
load_dotenv
fastapi
uvicorn
pytest
pytest-asyncio
httpx
langchain
langchain-openai
langchain-core
#logging
#logging-conf
google-auth
google-auth-oauthlib
google-auth-httplib2
google-api-python-client
python-dotenv
whisper-timestamped
silero-vad
fastapi_versionizer
aiofiles==24.1.0
annotated-doc==0.0.4
annotated-types==0.7.0
anyio==4.12.1
backports.asyncio.runner==1.2.0
brotli==1.2.0
certifi==2026.1.4
cffi==2.0.0
charset-normalizer==3.4.4
click==8.3.1
coloredlogs==15.0.1
cryptography==46.0.5
Cython==3.2.4
distro==1.9.0
dtw-python==1.7.4
exceptiongroup==1.3.1
fastapi==0.129.0
fastapi_versionizer==4.0.2
ffmpy==1.0.0
filelock==3.24.3
flatbuffers==25.12.19
fsspec==2026.2.0
google-api-core==2.30.0
google-api-python-client==2.190.0
google-auth==2.48.0
google-auth-httplib2==0.3.0
google-auth-oauthlib==1.2.4
googleapis-common-protos==1.72.0
gradio==6.6.0
gradio_client==2.1.0
groovy==0.1.2
h11==0.16.0
hf-xet==1.2.0
httpcore==1.0.9
httplib2==0.31.2
httpx==0.28.1
huggingface_hub==1.4.1
humanfriendly==10.0
idna==3.11
iniconfig==2.3.0
Jinja2==3.1.6
jiter==0.13.0
jsonpatch==1.33
jsonpointer==3.0.0
langchain==1.2.10
langchain-core==1.2.13
langchain-openai==1.1.10
langgraph==1.0.8
langgraph-checkpoint==4.0.0
langgraph-prebuilt==1.0.7
langgraph-sdk==0.3.7
langsmith==0.7.4
llvmlite==0.46.0
load-dotenv==0.1.0
markdown-it-py==4.0.0
MarkupSafe==3.0.3
mdurl==0.1.2
more-itertools==10.8.0
mpmath==1.3.0
natsort==8.4.0
networkx==3.4.2
newrelic==11.4.0
numba==0.64.0
numpy==2.2.6
oauthlib==3.3.1
ollama==0.6.1
onnxruntime==1.23.2
openai==2.21.0
openai-whisper==20250625
orjson==3.11.7
ormsgpack==1.12.2
packaging @ file:///home/conda/feedstock_root/build_artifacts/bld/rattler-build_packaging_1769093650/work
pandas==2.3.3
pillow==12.1.1
pluggy==1.6.0
proto-plus==1.27.1
protobuf==6.33.5
pyasn1==0.6.2
pyasn1_modules==0.4.2
pycparser==3.0
pydantic==2.12.5
pydantic_core==2.41.5
pydub==0.25.1
Pygments==2.19.2
pyparsing==3.3.2
pytest==9.0.2
pytest-asyncio==1.3.0
python-dateutil==2.9.0.post0
python-dotenv==1.2.1
python-multipart==0.0.22
pytz==2025.2
PyYAML==6.0.3
regex==2026.1.15
requests==2.32.5
requests-oauthlib==2.0.0
requests-toolbelt==1.0.0
rich==14.3.2
rsa==4.9.1
safehttpx==0.1.7
scipy==1.15.3
semantic-version==2.10.0
shellingham==1.5.4
silero-vad==6.2.0
six==1.17.0
sniffio==1.3.1
starlette==0.52.1
sympy==1.14.0
tenacity==9.1.4
tiktoken==0.12.0
tomli==2.4.0
tomlkit==0.13.3
torch==2.10.0
torchaudio==2.10.0
tqdm==4.67.3
typer==0.24.0
typer-slim==0.24.0
typing-inspection==0.4.2
typing_extensions==4.15.0
tzdata==2025.3
uritemplate==4.2.0
urllib3==2.6.3
uuid_utils==0.14.0
uvicorn==0.41.0
whisper-timestamped==1.15.9
xxhash==3.6.0
zstandard==0.25.0
4 changes: 4 additions & 0 deletions service/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,7 @@ DB_NAME=lingo
# Zaban STT/TTS API (optional; used for upload STT and TTS)
ZABAN_BASE_URL=http://localhost:8000
ZABAN_API_KEY=

# New Relic APM (optional; used when running under newrelic-admin)
NEW_RELIC_LICENSE_KEY=
NEW_RELIC_APP_NAME=
10 changes: 7 additions & 3 deletions service/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@ RUN apt-get update && \
COPY --from=builder /usr/local/lib/python3.9/site-packages /usr/local/lib/python3.9/site-packages
COPY --from=builder /usr/local/bin /usr/local/bin

# Copy application code
# Ensure New Relic CLI is available (newrelic-admin); builder cache may omit it
RUN pip install --no-cache-dir newrelic

# Copy application code (includes newrelic.ini when present)
COPY . .

# Create non-root user for security
Expand All @@ -40,5 +43,6 @@ USER appuser

EXPOSE 8000

# Production uvicorn with multiple workers
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000", "--workers", "4"]
# Run uvicorn under New Relic agent (config: /lingo/service/newrelic.ini)
ENV NEW_RELIC_CONFIG_FILE=/lingo/service/newrelic.ini
CMD ["newrelic-admin", "run-program", "uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000", "--workers", "4"]
4 changes: 2 additions & 2 deletions service/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
db_name = os.getenv("DB_NAME")

# Zaban STT/TTS API (replaces Sarvam for speech). Use https to avoid redirect (POST→GET causes 405).
zaban_base_url = os.getenv("ZABAN_BASE_URL", "")
zaban_api_key = os.getenv("ZABAN_API_KEY", "")
zaban_base_url = os.getenv("ZABAN_BASE_URL", "https://zaban.joshsoftware.com")
zaban_api_key = os.getenv("ZABAN_API_KEY", "sk-JxltoFeftZbEMluKwlCNDLM4-RyvpC2a8xHqprv21kajZjeVrfiQ1Ihj2LAsdmxJ")

# Redis configuration
redis_host = os.getenv("REDIS_HOST", "localhost")
Expand Down
Loading