TeluguBOT / Dockerfile
Deepti-AI's picture
Upload 5 files
4187281 verified
raw
history blame contribute delete
970 Bytes
FROM python:3.11-slim
# ---- Set environment variables (Updated here only for HF compatibility) ----
ENV PYTHONUNBUFFERED=1
ENV TRANSFORMERS_CACHE=/app/.cache/transformers
ENV HF_HOME=/app/.cache/huggingface
# ---- Optional: define keys via secrets, not hardcoded ----
# ENV DEEPGRAM_API_KEY=your_key
# ENV OPENAI_API_KEY=your_key
# ---- Set working directory ----
WORKDIR /app
# Add below WORKDIR /app
RUN mkdir -p /app/.cache/transformers /app/.cache/huggingface
RUN chmod -R 777 /app/.cache
# ---- Install system dependencies ----
RUN apt-get update && apt-get install -y \
ffmpeg \
build-essential \
libsndfile1 \
&& rm -rf /var/lib/apt/lists/*
# ---- Copy project files ----
COPY . /app
# ---- Install Python dependencies ----
RUN pip install --upgrade pip
RUN pip install --no-cache-dir -r requirements.txt
# ---- Expose port ----
EXPOSE 7860
# ---- Run FastAPI app ----
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]