Awesome-Developer commited on
Commit
8c5ab59
·
verified ·
1 Parent(s): 213eb48

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -5
Dockerfile CHANGED
@@ -1,13 +1,14 @@
1
  FROM python:3.9
2
 
3
- # Install Ollama and Tmate for connection
4
- RUN apt-get update && apt-get install -y curl tmate
 
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 and Tmate in the foreground
13
- CMD ollama serve & tmate -F
 
 
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