Spaces:
Paused
Paused
Update Dockerfile
Browse files- Dockerfile +6 -5
Dockerfile
CHANGED
|
@@ -1,13 +1,14 @@
|
|
| 1 |
FROM python:3.9
|
| 2 |
|
| 3 |
-
# Install
|
| 4 |
-
RUN apt-get update && apt-get install -y curl
|
|
|
|
| 5 |
RUN curl -fsSL https://ollama.com/install.sh | sh
|
| 6 |
|
| 7 |
-
# Set up a working directory
|
| 8 |
WORKDIR /app
|
| 9 |
COPY . .
|
| 10 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 11 |
|
| 12 |
-
# Start Ollama in the background
|
| 13 |
-
|
|
|
|
|
|
| 1 |
FROM python:3.9
|
| 2 |
|
| 3 |
+
# 1. Install dependencies: curl, zstd (for ollama), and sshx
|
| 4 |
+
RUN apt-get update && apt-get install -y curl zstd
|
| 5 |
+
RUN curl -sSf https://sshx.io/get.sh | sh
|
| 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 |
+
# 2. Start Ollama and sshx in the background, then run the app
|
| 13 |
+
# The 'sshx' command will print a URL to your Hugging Face logs
|
| 14 |
+
CMD ollama serve & sshx & uvicorn app:app --host 0.0.0.0 --port 7860
|