speech / Dockerfile
harsh-dev's picture
docker b
4de8573
raw
history blame contribute delete
843 Bytes
# --------------------
# 1️⃣ Base image
# --------------------
FROM python:3.11-slim
# --------------------
# 2️⃣ Environment
# --------------------
ENV PYTHONUNBUFFERED=1 \
LANG=C.UTF-8 \
LC_ALL=C.UTF-8 \
PIP_NO_CACHE_DIR=1
# --------------------
# 3️⃣ Working directory
# --------------------
WORKDIR /app
# --------------------
# 4️⃣ Copy files
# --------------------
COPY . .
# --------------------
# 5️⃣ Upgrade pip & install dependencies
# --------------------
RUN pip install --no-cache-dir --upgrade pip \
&& pip install --no-cache-dir -r requirements.txt
# --------------------
# 6️⃣ Expose port
# --------------------
EXPOSE 7860
# --------------------
# 7️⃣ Command to run FastAPI
# --------------------
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860", "--reload"]