Interview_AI / Dockerfile
LiamKhoaLe's picture
Deploy interview assistant app
e7b1e22
raw
history blame
845 Bytes
FROM python:3.11-slim
# Set environment variables (may need to change authority)
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1
# ENV to inject secret
# ARG HF_TOKEN
# ENV HF_TOKEN=${HF_TOKEN}
# Create working directory (and authorised token)
WORKDIR /app
# Install SSL root certs and system deps required by pymongo + DNS
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates curl dnsutils gcc openssl && \
rm -rf /var/lib/apt/lists/*
# Copy and install dependencies
COPY requirements.txt .
RUN pip install --upgrade pip && pip install --no-cache-dir -r requirements.txt
# Copy source code (app files)
COPY . .
# Expose the port used by Uvicorn
EXPOSE 7860
# Run the FastAPI application using Uvicorn
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860", "--log-level", "debug"]