ais-api / Dockerfile
csmith715's picture
Docker changes
c17d855
raw
history blame contribute delete
733 Bytes
FROM python:3.12-slim
# System deps for OpenCV
RUN apt-get update && apt-get install -y --no-install-recommends \
libgl1 libglib2.0-0 && \
rm -rf /var/lib/apt/lists/*
# ...
# Silence Ultralytics config-dir warning and set safe defaults
ENV YOLO_CONFIG_DIR=/tmp/Ultralytics
ENV MAX_UPLOAD_BYTES=8388608
ENV MAX_SIDE=2000
# ...
WORKDIR /app
COPY requirements.txt /app/
RUN pip install --no-cache-dir -r requirements.txt
# Copy app code and weights
COPY app.py /app/app.py
COPY weld_tiling.py /app/weld_tiling.py
COPY best_7-15-25.pt /app/best_7-15-25.pt
# Environment (optional): set an auth token to protect the API
# ENV API_TOKEN=change-me
EXPOSE 7860
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]