| # syntax=docker/dockerfile:1 | |
| FROM python:3.10-bullseye | |
| EXPOSE 7860 | |
| WORKDIR /app | |
| COPY . . | |
| # Set environment variables for safe caching | |
| ENV MPLCONFIGDIR=/tmp/.matplotlib | |
| ENV NUMBA_CACHE_DIR=/tmp/numba_cache | |
| # Make necessary dirs and files writable | |
| RUN mkdir -p /app/logs /app/TEMP && \ | |
| chmod -R 777 /app/logs /app/TEMP /app/configs && \ | |
| chmod 666 /app/configs/32k.json || true && \ | |
| chmod 666 /app/trainset_preprocess_pipeline_print.py || true | |
| RUN pip3 install -r requirements.txt | |
| RUN echo "Checking contents of /app:" && ls -l /app | |
| CMD ["python3", "-u", "EasierGUI.py"] | |