FROM python:3.12-slim | |
WORKDIR /app | |
COPY . /app | |
# Ensure /app is writable for session files | |
RUN chmod -R 777 /app | |
# Install build tools and dependencies | |
RUN apt-get update && \ | |
apt-get install -y gcc && \ | |
pip install --no-cache-dir --upgrade pip && \ | |
pip install --no-cache-dir -r requirements.txt && \ | |
apt-get remove -y gcc && \ | |
apt-get autoremove -y && \ | |
rm -rf /var/lib/apt/lists/* | |
RUN pip3 install uvicorn fastapi | |
# Ensure writable directories | |
RUN mkdir -p /app/modules && chmod 777 /app/modules | |
RUN mkdir -p /app/sessions && chmod 777 /app/sessions | |
# Start the FastAPI app | |
CMD python3 jarvis.py & python3 server.py | |