Mahmudm commited on
Commit
5e609be
·
verified ·
1 Parent(s): 3ccab73

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +18 -0
Dockerfile ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.11-slim
2
+
3
+ WORKDIR /code
4
+
5
+ # Install dependencies
6
+ COPY ./requirements.txt /code/requirements.txt
7
+ RUN python3 -m pip install --no-cache-dir --upgrade pip
8
+ RUN python3 -m pip install --no-cache-dir --upgrade -r /code/requirements.txt
9
+
10
+ # Copy the app code
11
+ COPY . .
12
+
13
+ # Set permissions if needed (avoid root-level writes)
14
+ RUN mkdir -p /code/.cache && chmod -R 777 /code/.cache
15
+ ENV XDG_CACHE_HOME=/code/.cache
16
+
17
+ # Run the Panel server
18
+ CMD ["panel", "serve", "/code/app.py", "--address", "0.0.0.0", "--port", "7860", "--allow-websocket-origin", "*", "--index", "app"]