PyxiLabs commited on
Commit
6d00b38
·
verified ·
1 Parent(s): 33d74f8

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -11
Dockerfile CHANGED
@@ -2,23 +2,21 @@ FROM python:3.10-slim-buster
2
 
3
  WORKDIR /app
4
 
5
- # Copy the script into the container's /app directory
6
  COPY ollama.sh /app/ollama.sh
 
7
 
8
- # Create virtual environment and set permissions
9
- RUN python -m venv venv && \
10
- chmod +x /app/ollama.sh
11
 
12
- # Install Ollama
13
- RUN curl https://ollama.ai/install.sh | sh
14
-
15
- # Prepare Ollama directory
16
  RUN mkdir -p /.ollama && chmod 777 /.ollama
17
 
18
- # Ensure Ollama binary is accessible
19
- ENV PATH="/root/.ollama/bin:$PATH"
20
 
21
  EXPOSE 11434
22
 
23
- # Use the correct path to the script
24
  ENTRYPOINT ["/app/ollama.sh"]
 
2
 
3
  WORKDIR /app
4
 
5
+ # Copy script with proper permissions
6
  COPY ollama.sh /app/ollama.sh
7
+ RUN chmod +x /app/ollama.sh
8
 
9
+ # Install system dependencies and Ollama
10
+ RUN apt-get update && apt-get install -y curl && \
11
+ curl https://ollama.ai/install.sh | sh
12
 
13
+ # Create directory with correct permissions
 
 
 
14
  RUN mkdir -p /.ollama && chmod 777 /.ollama
15
 
16
+ # Ensure Ollama is in PATH (standard installation location)
17
+ ENV PATH="/usr/local/bin:$PATH"
18
 
19
  EXPOSE 11434
20
 
21
+ # Use absolute path to script
22
  ENTRYPOINT ["/app/ollama.sh"]