File size: 786 Bytes
d8b200a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
FROM python:3.9

# Add settings taken from huggingface default container.
WORKDIR /home/user/app
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 requirements.txt
RUN pip install -r requirements.txt

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

# Cache matplotlib fonts to improve startup time.
RUN python -c "import matplotlib.pyplot"

COPY . /home/user/app
CMD python app.py