File size: 564 Bytes
5e609be
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
63d4222
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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"]