Spaces:
Sleeping
Sleeping
File size: 1,229 Bytes
5142c8f |
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 |
# Starting from the Grobid image
FROM lfoppiano/grobid:0.7.3
# Setting the user to root for installation purposes
USER root
# Create necessary directories for Grobid
RUN mkdir -m 777 -p /opt/grobid/grobid-home/tmp
# Install supervisord and python (for gradio)
RUN apt-get update && apt-get install -y supervisor python3 python3-pip && rm -rf /var/lib/apt/lists/*
# Copy your gradio app to the image
COPY . /app/
COPY ./data /app/data
# Install gradio
RUN pip3 install gradio
RUN pip3 install -r /app/requirements.txt
# Supervisord configuration
RUN echo "[supervisord]" > /etc/supervisor/conf.d/supervisord.conf && \
echo "nodaemon=true" >> /etc/supervisor/conf.d/supervisord.conf && \
echo "" >> /etc/supervisor/conf.d/supervisord.conf && \
echo "[program:grobid]" >> /etc/supervisor/conf.d/supervisord.conf && \
echo "command=/opt/grobid/grobid-service/bin/grobid-service" >> /etc/supervisor/conf.d/supervisord.conf && \
echo "" >> /etc/supervisor/conf.d/supervisord.conf && \
echo "[program:gradio]" >> /etc/supervisor/conf.d/supervisord.conf && \
echo "command=python3 /app/main.py" >> /etc/supervisor/conf.d/supervisord.conf
# Start processes with supervisord
CMD ["/usr/bin/supervisord"]
|