File size: 992 Bytes
7c15d15
 
 
 
 
 
 
 
 
f04b23c
7c15d15
 
 
 
 
 
 
 
 
 
2cc6cfa
d7d07a7
7c15d15
 
 
 
 
 
 
 
 
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
FROM python:3.10-slim

ENV DEBIAN_FRONTEND=noninteractive \
    PIP_NO_CACHE_DIR=1 \
    PYTHONUNBUFFERED=1 \
    HF_HOME=/home/user/.cache/huggingface \
    TOKENIZERS_PARALLELISM=false

RUN apt-get update && apt-get install -y --no-install-recommends \
        build-essential git curl ca-certificates tk \
    && rm -rf /var/lib/apt/lists/*

RUN useradd -m -u 1000 user
USER user
ENV PATH="/home/user/.local/bin:${PATH}"
WORKDIR /home/user/app

COPY --chown=user:user requirements.txt .
RUN pip install --user -U pip && \
    pip install --user -r requirements.txt && \
    pip install --user --no-deps weasel==0.3.4 && \
    pip install --user --no-deps spacy==3.7.2 && \
    pip install --user --no-deps salesforce-lavis==1.0.2 && \
    SKLEARN_ALLOW_DEPRECATED_SKLEARN_PACKAGE_INSTALL=True \
        pip install --user --no-deps opendelta==0.3.2 && \
    pip install --user bigmodelvis==0.0.1 delta-center-client==0.0.4

COPY --chown=user:user . .

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