Spaces:
Running
Running
File size: 787 Bytes
20c9908 1f7d232 5fabedd 1f7d232 e05e237 53f8062 e805350 5e1cc84 e05e237 9cfd79b 5da7861 e05e237 |
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 |
FROM python:3.9-slim
RUN apt-get update && apt-get install -y gcc ghostscript pdftohtml imagemagick parallel python3-dev python3-pip libxml2-dev build-essential python3-dev python3-distutils libxslt1-dev zlib1g-dev g++
COPY requirements.txt .
# Set environment variables for Matplotlib and Fontconfig
ENV MPLCONFIGDIR=/tmp/matplotlib_config
ENV XDG_CACHE_HOME=/tmp/cache
# Create writable directories
RUN mkdir -p /tmp/matplotlib_config /tmp/cache/fontconfig && \
chmod -R 777 /tmp/matplotlib_config /tmp/cache
RUN pip install --upgrade pip setuptools wheel
RUN pip install numpy==1.19.3
RUN pip install --no-cache-dir -r requirements.txt --upgrade
RUN pip install numpy==1.23.4
COPY app app/
RUN python app/server.py
EXPOSE 5042
CMD ["python", "app/server.py", "serve"] |