csepartha commited on
Commit
6e4f4c9
·
verified ·
1 Parent(s): f14b058

Upload Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -5
Dockerfile CHANGED
@@ -10,14 +10,17 @@ RUN curl -fsSL https://ollama.com/install.sh | sh
10
  COPY requirements.txt .
11
  RUN pip install --no-cache-dir -r requirements.txt
12
 
13
- # Copy project
14
- COPY . .
15
 
16
- # Non-root user (recommended for Hugging Face Spaces)
17
- RUN useradd -ms /bin/bash user && chown -R user:user ./
18
- USER user
19
 
 
20
  EXPOSE 7860
21
 
 
 
 
22
  CMD ["./demo.launcher"]
23
 
 
10
  COPY requirements.txt .
11
  RUN pip install --no-cache-dir -r requirements.txt
12
 
13
+ # Copy only the necessary files (e.g., server, client, and launcher scripts)
14
+ COPY server.py client.py demo.launcher demo.db ./
15
 
16
+ # Create a non-root user and avoid problematic directories (do this after copying files)
17
+ RUN useradd -ms /bin/bash user && chown -R user:user ./server.py ./client.py ./demo.launcher ./demo.db
 
18
 
19
+ # Expose port for Gradio
20
  EXPOSE 7860
21
 
22
+ USER user
23
+
24
+ # Start the application (run your launcher script)
25
  CMD ["./demo.launcher"]
26