File size: 846 Bytes
d505436
 
 
 
 
 
 
 
 
 
 
 
 
 
8299190
 
d505436
 
 
 
 
8299190
 
d505436
8299190
d505436
8299190
d505436
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.9

# Add settings taken from huggingface default container.
RUN useradd -m -u 1000 user
RUN apt-get update && apt-get install -y \
    git git-lfs ffmpeg 	libsm6 	libxext6 \
    cmake libgl1-mesa-glx \
    && rm -rf /var/lib/apt/lists/* \
    && git lfs install

# Use older setuptools to avoid 2to3 error with dependencies.
RUN pip install 'setuptools<58'

# Install drexel_metadata dependencies
COPY requirements.txt /tmp/requirements.txt
RUN pip install -r /tmp/requirements.txt

# Install gradio after main dependencies to prevent
# `cannot import name 'deprecated' from 'typing_extensions'` error.
RUN pip install gradio

USER user
WORKDIR /home/user/app
# Cache matplotlib fonts to improve startup time.
RUN mkdir /home/user/.cache && python -c "import matplotlib.pyplot"

COPY --chown=user . /home/user/app
CMD python app.py