Spaces:
Sleeping
Sleeping
barisaydin
commited on
Commit
•
4fb661d
1
Parent(s):
c01a5f5
Update Dockerfile
Browse files- Dockerfile +14 -10
Dockerfile
CHANGED
@@ -3,7 +3,7 @@ FROM ubuntu:latest
|
|
3 |
|
4 |
# Update the package list, install curl, and clean up to reduce image size
|
5 |
RUN apt-get update && \
|
6 |
-
apt-get install -y curl
|
7 |
apt-get clean && \
|
8 |
rm -rf /var/lib/apt/lists/*
|
9 |
|
@@ -13,6 +13,15 @@ RUN curl -fsSL https://ollama.com/install.sh | sh
|
|
13 |
# Set the Ollama host environment variable
|
14 |
ENV OLLAMA_HOST=0.0.0.0
|
15 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
# Create the Ollama directory and set permissions
|
17 |
RUN mkdir -p /.ollama && chmod 777 /.ollama
|
18 |
|
@@ -22,18 +31,13 @@ RUN mkdir -p /usr/share/ollama/.ollama/models && chmod -R 777 /usr/share/ollama/
|
|
22 |
# Set the Ollama models environment variable
|
23 |
ENV OLLAMA_MODELS="/usr/share/ollama/.ollama/models"
|
24 |
|
25 |
-
# Copy the Nginx configuration file
|
26 |
-
COPY nginx.conf /etc/nginx/nginx.conf
|
27 |
-
|
28 |
-
# Copy Lua script
|
29 |
-
COPY validate_api_key.lua /usr/local/openresty/nginx/lua/validate_api_key.lua
|
30 |
-
|
31 |
# Expose the Ollama server port
|
32 |
-
EXPOSE
|
33 |
|
34 |
# Run the Ollama server and pull the model
|
35 |
CMD ollama serve & \
|
36 |
sleep 5 && \
|
37 |
ollama pull llama3 && \
|
38 |
-
|
39 |
-
|
|
|
|
3 |
|
4 |
# Update the package list, install curl, and clean up to reduce image size
|
5 |
RUN apt-get update && \
|
6 |
+
apt-get install -y curl && \
|
7 |
apt-get clean && \
|
8 |
rm -rf /var/lib/apt/lists/*
|
9 |
|
|
|
13 |
# Set the Ollama host environment variable
|
14 |
ENV OLLAMA_HOST=0.0.0.0
|
15 |
|
16 |
+
# Set the Ollama origins environment variable
|
17 |
+
ENV OLLAMA_ORIGINS="api.devsolux.com"
|
18 |
+
|
19 |
+
# Production or Sensitive Environments
|
20 |
+
ENV OLLAMA_NOHISTORY=1
|
21 |
+
|
22 |
+
# Debug information
|
23 |
+
ENV OLLAMA_DEBUG=0
|
24 |
+
|
25 |
# Create the Ollama directory and set permissions
|
26 |
RUN mkdir -p /.ollama && chmod 777 /.ollama
|
27 |
|
|
|
31 |
# Set the Ollama models environment variable
|
32 |
ENV OLLAMA_MODELS="/usr/share/ollama/.ollama/models"
|
33 |
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
# Expose the Ollama server port
|
35 |
+
EXPOSE 7860
|
36 |
|
37 |
# Run the Ollama server and pull the model
|
38 |
CMD ollama serve & \
|
39 |
sleep 5 && \
|
40 |
ollama pull llama3 && \
|
41 |
+
ollama pull llava && \
|
42 |
+
ollama pull moondream:1.8b-v2-fp16 && \
|
43 |
+
wait
|