-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathContainerfile
More file actions
25 lines (18 loc) · 820 Bytes
/
Copy pathContainerfile
File metadata and controls
25 lines (18 loc) · 820 Bytes
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
FROM python:3.11-slim
RUN apt-get update && apt-get install -y --no-install-recommends \
wget fonts-dejavu-core \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Download Obico failure-detection model
RUN mkdir -p /app/model && \
wget -q -O /app/model/names \
"https://raw.githubusercontent.com/TheSpaghettiDetective/obico-server/release/ml_api/model/names" && \
wget -q -O /tmp/onnx.url \
"https://raw.githubusercontent.com/TheSpaghettiDetective/obico-server/release/ml_api/model/model-weights.onnx.url" && \
wget -q -O /app/model/model.onnx "$(cat /tmp/onnx.url | tr -d '\r\n')" && \
rm /tmp/onnx.url
COPY app.py .
EXPOSE 3333
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "3333"]