|
|
|
FROM python:3.9-slim |
|
|
|
|
|
WORKDIR /app |
|
|
|
|
|
RUN mkdir /app/files/ |
|
|
|
RUN chmod 777 /app/files/ |
|
|
|
|
|
COPY requirements.txt . |
|
COPY serve_grobid.sh . |
|
|
|
|
|
RUN apt-get update && \ |
|
apt-get install -y openjdk-11-jre-headless && \ |
|
apt-get clean; |
|
ENV JAVA_HOME /usr/lib/jvm/java-11-openjdk-amd64/ |
|
ENV PATH $JAVA_HOME/bin:$PATH |
|
|
|
|
|
|
|
RUN pip install --no-cache-dir -r requirements.txt |
|
|
|
|
|
COPY . /app |
|
|
|
|
|
EXPOSE 7860 |
|
EXPOSE 5000 |
|
|
|
|
|
RUN apt-get update && \ |
|
apt-get install -y wget unzip |
|
RUN chmod +x serve_grobid.sh |
|
RUN ./serve_grobid.sh |
|
|
|
|
|
RUN python backend.py |
|
|
|
|
|
CMD ["streamlit", "run", "frontend.py", "--server.address", "0.0.0.0", "--server.port", "7860", "--server.enableCORS", "true", "--server.enableXsrfProtection", "false"] |
|
|
|
|