File size: 778 Bytes
3096464
ef87776
 
 
 
 
 
 
9cb2f64
 
ef87776
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9cb2f64
3096464
 
9cb2f64
ef87776
 
 
 
 
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
FROM python:3.8-slim

ENV DEBIAN_FRONTEND=noninteractive
ENV GRADIO_SERVER_NAME=0.0.0.0
ENV GRADIO_SERVER_PORT=7860
ENV PYTHONUNBUFFERED=1
ENV PIP_NO_CACHE_DIR=1

WORKDIR /app

RUN apt-get update && apt-get install -y --no-install-recommends \
    build-essential \
    gcc g++ \
    git \
    curl \
    libgomp1 \
    libgl1 \
    libglib2.0-0 \
    libsm6 \
    libxext6 \
    libxrender1 \
  && rm -rf /var/lib/apt/lists/*

COPY requirements.txt /app/requirements.txt

RUN python -m pip install --upgrade pip setuptools wheel

# Helpful for some PyCaret 2.x installs that try to pull deprecated 'sklearn' package
ENV SKLEARN_ALLOW_DEPRECATED_SKLEARN_PACKAGE_INSTALL=True

RUN python -m pip install -r /app/requirements.txt

COPY . /app

EXPOSE 7860
CMD ["python", "app.py"]