File size: 572 Bytes
a5fdc74
3fc0271
1738002
8e8d783
a5fdc74
8e8d783
 
 
 
1738002
 
0219b19
 
f212e36
 
 
 
 
 
 
c6d5a36
a5fdc74
1738002
f212e36
 
0219b19
1738002
a5fdc74
b04f72f
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
30
FROM python:3.10-slim

RUN apt-get update && apt-get install -y \
    libglib2.0-0 \
    libgl1-mesa-glx \
    libsm6 \
    libxext6 \
    libxrender-dev \
    git \
    && rm -rf /var/lib/apt/lists/*

WORKDIR /app

RUN useradd -m appuser
RUN chown -R appuser:appuser /app

RUN mkdir -p /tmp/matplotlib /tmp/torchxrayvision
RUN chown -R appuser:appuser /tmp/matplotlib /tmp/torchxrayvision

COPY --chown=appuser:appuser . .

RUN pip install --no-cache-dir -r requirements.txt

USER appuser

EXPOSE 7860

CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]