Spaces:
Paused
Paused
Update Dockerfile
Browse files- Dockerfile +9 -5
Dockerfile
CHANGED
|
@@ -1,14 +1,18 @@
|
|
| 1 |
FROM python:3.9
|
| 2 |
|
| 3 |
-
# 1. Install dependencies: curl, zstd (for ollama)
|
| 4 |
RUN apt-get update && apt-get install -y curl zstd
|
| 5 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
RUN curl -fsSL https://ollama.com/install.sh | sh
|
| 7 |
|
| 8 |
WORKDIR /app
|
| 9 |
COPY . .
|
| 10 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 11 |
|
| 12 |
-
#
|
| 13 |
-
#
|
| 14 |
-
CMD ollama serve & sshx & uvicorn app:app --host 0.0.0.0 --port 7860
|
|
|
|
| 1 |
FROM python:3.9
|
| 2 |
|
| 3 |
+
# 1. Install dependencies: curl, zstd (for ollama)
|
| 4 |
RUN apt-get update && apt-get install -y curl zstd
|
| 5 |
+
|
| 6 |
+
# 2. Install sshx (Download first to avoid the 'sh' syntax error)
|
| 7 |
+
RUN curl -sSf https://sshx.io/get.sh -o get_sshx.sh && sh get_sshx.sh && rm get_sshx.sh
|
| 8 |
+
|
| 9 |
+
# 3. Install Ollama
|
| 10 |
RUN curl -fsSL https://ollama.com/install.sh | sh
|
| 11 |
|
| 12 |
WORKDIR /app
|
| 13 |
COPY . .
|
| 14 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 15 |
|
| 16 |
+
# 4. Start everything: Ollama (bg), sshx (bg), and Web App (fg)
|
| 17 |
+
# This will print the sshx link directly into your Hugging Face Logs
|
| 18 |
+
CMD ollama serve & (sleep 5 && sshx) & uvicorn app:app --host 0.0.0.0 --port 7860
|