Spaces:
Runtime error
Runtime error
File size: 716 Bytes
7df3ccc 9719f50 bd04035 698e958 9719f50 698e958 bd04035 698e958 9719f50 bd04035 106d410 bd04035 9719f50 bd04035 | 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 | FROM python:3.9-slim
WORKDIR /app
# Copy requirements and install dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy application files
COPY src/ .
# Create necessary directories with proper permissions
RUN mkdir -p /app/pdf_reports && \
mkdir -p /tmp/matplotlib && \
chmod -R 755 /app && \
chmod -R 777 /tmp/matplotlib
# Set environment variables for Gradio and Matplotlib
ENV GRADIO_SERVER_PORT=7860
ENV GRADIO_SERVER_NAME=0.0.0.0
ENV MPLCONFIGDIR=/tmp/matplotlib
# Expose both ports (8001 for backend, 7860 for frontend)
EXPOSE 8001 7860
# Create startup script to run both services
RUN chmod +x /app/start_app.sh
CMD ["/app/start_app.sh", "gradio"]
|