File size: 1,062 Bytes
ca291e1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
34
35
36
37
38
39
FROM python:3.10-slim

RUN apt-get update && apt-get install -y \
    build-essential \
    libgl1 \
    libglib2.0-0 \
    wget \
    git \
    && rm -rf /var/lib/apt/lists/*

RUN useradd -ms /bin/bash appuser
USER appuser

ENV HOME=/home/appuser \
    PATH=/home/appuser/.local/bin:$PATH \
    STATS_TYPE='HuggingFace_devcloud' \
    PYTHONDONTWRITEBYTECODE=1 \
    PYTHONUNBUFFERED=1

WORKDIR $HOME/app

RUN pip install --no-cache-dir --upgrade pip

COPY --chown=appuser . $HOME/app

#For training and benchmarking clone modelzoo-services
RUN git clone https://github.com/STMicroelectronics/stm32ai-modelzoo-services.git

#To benchmark pre-trained models from stm32ai-modelzoo clone this repo 
#RUN git clone https://github.com/STMicroelectronics/stm32ai-modelzoo.git

COPY --chown=appuser download_datasets.py $HOME/app/download_datasets.py

RUN pip install --no-cache-dir -r requirements_dash.txt
RUN pip install --no-cache-dir -r stm32ai-modelzoo-services/requirements.txt

EXPOSE 7860

CMD ["sh", "-c", "python download_datasets.py && python dash_app.py"]