Spaces:
Running
Running
alibidaran
commited on
Update Dockerfile
Browse files- Dockerfile +8 -9
Dockerfile
CHANGED
@@ -5,19 +5,21 @@ FROM python:3.10-slim
|
|
5 |
RUN apt-get update && apt-get install -y curl unzip && rm -rf /var/lib/apt/lists/*
|
6 |
|
7 |
# Install Ollama server
|
8 |
-
|
9 |
-
|
10 |
# Set working directory for the app
|
11 |
WORKDIR /app
|
12 |
-
# RUN mkdir -p /app/.ollama
|
13 |
|
14 |
-
#
|
15 |
-
|
|
|
|
|
|
|
|
|
16 |
# Copy application files and model
|
17 |
COPY . /app
|
18 |
|
19 |
# Install Python dependencies
|
20 |
-
RUN curl -fsSL https://ollama.com/install.sh | sh
|
21 |
RUN pip install --no-cache-dir gradio requests
|
22 |
|
23 |
# Expose ports for Gradio and Ollama
|
@@ -27,8 +29,5 @@ EXPOSE 7860 11434
|
|
27 |
COPY start_services.sh /app/start_services.sh
|
28 |
RUN chmod +x /app/start_services.sh
|
29 |
|
30 |
-
# Download the Ollama service
|
31 |
-
|
32 |
-
|
33 |
# Run the start_services.sh script
|
34 |
CMD ["/app/start_services.sh"]
|
|
|
5 |
RUN apt-get update && apt-get install -y curl unzip && rm -rf /var/lib/apt/lists/*
|
6 |
|
7 |
# Install Ollama server
|
8 |
+
RUN curl -L https://ollama.com/download/ollama-linux-amd64.tgz -o ollama-linux-amd64.tgz
|
9 |
+
&&sudo tar -C /usr -xzf ollama-linux-amd64.tgz
|
10 |
# Set working directory for the app
|
11 |
WORKDIR /app
|
|
|
12 |
|
13 |
+
# Create a directory for Ollama
|
14 |
+
RUN mkdir -p /app/.ollama
|
15 |
+
|
16 |
+
# Set environment variable for Ollama home directory
|
17 |
+
ENV OLLAMA_HOME=/app/.ollama
|
18 |
+
|
19 |
# Copy application files and model
|
20 |
COPY . /app
|
21 |
|
22 |
# Install Python dependencies
|
|
|
23 |
RUN pip install --no-cache-dir gradio requests
|
24 |
|
25 |
# Expose ports for Gradio and Ollama
|
|
|
29 |
COPY start_services.sh /app/start_services.sh
|
30 |
RUN chmod +x /app/start_services.sh
|
31 |
|
|
|
|
|
|
|
32 |
# Run the start_services.sh script
|
33 |
CMD ["/app/start_services.sh"]
|