Spaces:
Paused
Paused
Update Dockerfile
Browse files- Dockerfile +7 -5
Dockerfile
CHANGED
|
@@ -1,10 +1,10 @@
|
|
| 1 |
FROM python:3.9
|
| 2 |
|
| 3 |
-
# 1. Install dependencies: curl
|
| 4 |
RUN apt-get update && apt-get install -y curl zstd
|
| 5 |
|
| 6 |
-
# 2. Install sshx (
|
| 7 |
-
RUN curl -sSf https://sshx.io/get
|
| 8 |
|
| 9 |
# 3. Install Ollama
|
| 10 |
RUN curl -fsSL https://ollama.com/install.sh | sh
|
|
@@ -13,6 +13,8 @@ WORKDIR /app
|
|
| 13 |
COPY . .
|
| 14 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 15 |
|
| 16 |
-
# 4. Start everything
|
| 17 |
-
#
|
|
|
|
|
|
|
| 18 |
CMD ollama serve & (sleep 5 && sshx) & uvicorn app:app --host 0.0.0.0 --port 7860
|
|
|
|
| 1 |
FROM python:3.9
|
| 2 |
|
| 3 |
+
# 1. Install dependencies: curl and zstd (required for Ollama)
|
| 4 |
RUN apt-get update && apt-get install -y curl zstd
|
| 5 |
|
| 6 |
+
# 2. Install sshx (Direct install)
|
| 7 |
+
RUN curl -sSf https://sshx.io/get | sh
|
| 8 |
|
| 9 |
# 3. Install Ollama
|
| 10 |
RUN curl -fsSL https://ollama.com/install.sh | sh
|
|
|
|
| 13 |
COPY . .
|
| 14 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 15 |
|
| 16 |
+
# 4. Start everything
|
| 17 |
+
# Ollama runs in background (&)
|
| 18 |
+
# sshx runs in background (&) and prints the link to logs
|
| 19 |
+
# Web app (uvicorn) stays in foreground to keep the Space alive
|
| 20 |
CMD ollama serve & (sleep 5 && sshx) & uvicorn app:app --host 0.0.0.0 --port 7860
|