Spaces:
Running
Running
File size: 789 Bytes
ab1ad17 |
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 |
FROM python:3.8-slim
# Set the working directory
WORKDIR /app
RUN apt-get update && \
apt-get install -y \
libgl1-mesa-glx \
libglib2.0-0 \
&& rm -rf /var/lib/apt/lists/*
# Copy the requirements file
COPY requirements.txt .
# Install dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Copy the rest of the application
COPY . .
# Expose the port the app runs on
EXPOSE 5000
# Create the uploads, flagged, and matplotlib_cache directories with proper permissions
RUN mkdir -p /app/flagged /app/matplotlib_cache && chmod -R 777 /app/uploads /app/flagged /app/matplotlib_cache
# Set the MPLCONFIGDIR environment variable
ENV MPLCONFIGDIR=/app/matplotlib_cache
# Run the application
CMD ["streamlit", "run", "app.py"]
|