fndetector-backend / Dockerfile
Harman823's picture
Deploy FN Detector backend
5de61f7 verified
Raw
History Blame Contribute Delete
592 Bytes
FROM python:3.11-slim
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
PIP_NO_CACHE_DIR=1 \
PORT=7860 \
MODEL_DIR=/app/deployment/model
RUN apt-get update && apt-get install -y --no-install-recommends \
libgomp1 \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY requirements.txt /app/requirements.txt
RUN python -m pip install --upgrade pip && \
python -m pip install -r /app/requirements.txt
COPY app.py /app/app.py
COPY src /app/src
COPY deployment /app/deployment
EXPOSE 7860
CMD ["sh", "-c", "uvicorn app:app --host 0.0.0.0 --port ${PORT:-7860}"]