File size: 664 Bytes
103a375
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
FROM registry.hf.space/vgotcheva-base-dev:latest
#FROM python:3.9
#ARG GRADIO_SERVER_PORT=7000
#ENV GRADIO_SERVER_PORT=${GRADIO_SERVER_PORT}

RUN apt-get update && apt-get install -y python3 python3-pip

RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user \
    PATH=/home/user/.local/bin:$PATH

WORKDIR $HOME/app
COPY --chown=user . $HOME/app

#WORKDIR /code
#COPY ./requirements.txt /code/requirements.txt
RUN pip install --no-cache-dir --upgrade pip
RUN pip install --no-cache-dir --upgrade -r requirements.txt

# Needed for caching the llama model due to its large size
RUN python -c "import model_llama as ml; ml.cached_folder"

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