File size: 776 Bytes
ceeb3e5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
31
32
33
# read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker
# you will also find guides on how best to write your Dockerfile

FROM ubuntu:22.04

ARG DEBIAN_FRONTEND=noninteractive

RUN useradd -m -u 1000 user

RUN apt-get update && apt-get install -y \
    git \
    curl \
    software-properties-common \
    python3.10 \
    python3.10-dev \
    && rm -rf /var/lib/apt/lists/* \
    && apt-get remove -y --purge python3-blinker

RUN apt-get update && apt-get install -y python3-opencv

WORKDIR /code

COPY --chown=user ./requirements.txt /code/requirements.txt

RUN curl -sS https://bootstrap.pypa.io/get-pip.py | python3.10 \
   && python3.10 -m pip install --no-cache-dir -r /code/requirements.txt 

COPY --chown=user . .

USER user

CMD ["python3.10", "main.py"]