Mahmudm's picture
Update Dockerfile
63d4222 verified
FROM python:3.11-slim
WORKDIR /code
# Install dependencies
COPY ./requirements.txt /code/requirements.txt
RUN python3 -m pip install --no-cache-dir --upgrade pip
RUN python3 -m pip install --no-cache-dir --upgrade -r /code/requirements.txt
# Copy the app code
COPY . .
# Set permissions if needed (avoid root-level writes)
RUN mkdir -p /code/.cache && chmod -R 777 /code/.cache
ENV XDG_CACHE_HOME=/code/.cache
# Run the Panel server
CMD ["panel", "serve", "app.py", "--address", "0.0.0.0", "--port", "7860", "--allow-websocket-origin", "*", "--index", "app"]