Spaces:
Running
Running
| FROM python:3.12-slim | |
| RUN useradd -m -u 1000 user | |
| ENV HOME=/home/user \ | |
| PATH=/home/user/.local/bin:$PATH \ | |
| DATA_DIR=/data \ | |
| API_URL=http://127.0.0.1:8000 | |
| WORKDIR $HOME/app | |
| RUN mkdir -p /data && chmod 777 /data | |
| COPY --chown=user backend/requirements.txt backend-requirements.txt | |
| COPY --chown=user frontend/requirements.txt frontend-requirements.txt | |
| USER user | |
| RUN pip install --no-cache-dir --upgrade pip && \ | |
| pip install --no-cache-dir -r backend-requirements.txt -r frontend-requirements.txt | |
| COPY --chown=user backend backend | |
| COPY --chown=user frontend frontend | |
| COPY --chown=user data data | |
| COPY --chown=user start-space.sh start-space.sh | |
| EXPOSE 8501 | |
| CMD ["bash", "start-space.sh"] | |