Spaces:
Runtime error
Runtime error
Upload Dockerfile
Browse files- 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
|
14 |
-
COPY . .
|
15 |
|
16 |
-
#
|
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 |
|