File size: 733 Bytes
9415326
 
 
 
 
 
 
f224d0a
 
 
 
 
 
 
9415326
 
 
 
 
 
c17d855
 
9415326
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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"]