File size: 767 Bytes
2c076ca
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7270518
2c076ca
 
 
 
 
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
38
39
40
FROM ubuntu:22.04

RUN apt-get update && apt-get install -y \
    python3 \
    python3-pip \
    wget \
    unzip \
    imagemagick \
    libmagickwand-dev

# Create a new directory and set it as the working directory
WORKDIR /code

COPY ./app.py /code/app.py
COPY ./policy.xml /code/policy.xml

RUN cp /code/policy.xml /etc/ImageMagick-6/policy.xml
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


RUN wget https://github.com/acl-org/aclpubcheck/archive/refs/heads/main.zip
RUN unzip main.zip
RUN cd aclpubcheck-main
RUN pip install -e ./aclpubcheck-main


RUN pip install gradio==3.48.0


EXPOSE 7860

CMD ["python3", "app.py", "--host", "0.0.0.0", "--port", "7860"]