File size: 960 Bytes
0a4b1cc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
FROM r8.im/philz1337x/clarity-upscaler@sha256:7787569e916746b4d7a19b7dbf5439fbcfd4d39445f875fc6e15d4b49786e46b
RUN apt-get update && apt-get install -y netcat jq

RUN useradd -m -u 1000 user
RUN chown -R user:user / || true
RUN chown -R user:user /src/
RUN chown -R user:user /root/
RUN chown -R user:user /var/
USER user
ENV HOME=/home/user \
    PATH=/home/user/.local/bin:$PATH \
    PYTHONPATH=$HOME/app \
    PYTHONUNBUFFERED=1 \
    GRADIO_ALLOW_FLAGGING=never \
    GRADIO_NUM_PORTS=1 \
    GRADIO_SERVER_NAME=0.0.0.0 \
    GRADIO_THEME=huggingface \
    SYSTEM=spaces 

WORKDIR $HOME/app
COPY ./requirements.txt /code/requirements.txt

# create virtual env for Gradio app
RUN python -m venv $HOME/.venv && \
    . $HOME/.venv/bin/activate && \ 
    pip install --no-cache-dir --upgrade pip && \
    pip install --no-cache-dir -r /code/requirements.txt 

COPY --chown=user . $HOME/app
RUN chmod +x $HOME/app/run.sh
CMD ["bash", "-c", "$HOME/app/run.sh"]