Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +2 -13
Dockerfile
CHANGED
@@ -5,10 +5,8 @@ WORKDIR /app
|
|
5 |
COPY requirements.txt requirements.txt
|
6 |
# Create a virtual environment
|
7 |
RUN python -m venv venv
|
8 |
-
|
9 |
# Set the PATH to use the virtual environment
|
10 |
ENV PATH="/app/venv/bin:$PATH"
|
11 |
-
|
12 |
# Update package list and install necessary packages in a single step
|
13 |
RUN apt-get update && apt-get install -y \
|
14 |
curl \
|
@@ -19,13 +17,13 @@ RUN apt-get update && apt-get install -y \
|
|
19 |
tini \
|
20 |
systemd && \
|
21 |
apt-get clean
|
22 |
-
|
23 |
# Upgrade pip and install dependencies
|
24 |
RUN python -m pip install --upgrade pip
|
25 |
RUN pip install --no-cache-dir -r requirements.txt
|
26 |
-
|
27 |
# Install Ollama
|
28 |
RUN curl -fsSL https://ollama.com/install.sh | sh
|
|
|
|
|
29 |
RUN which ollama
|
30 |
# Expose the port the application uses (replace 11434 with the actual port)
|
31 |
EXPOSE 11434
|
@@ -34,18 +32,9 @@ COPY . .
|
|
34 |
# Set proper permissions for the translations directory
|
35 |
RUN chmod -R 777 translations
|
36 |
|
37 |
-
# Install application
|
38 |
-
RUN curl https://ollama.ai/install.sh | sh
|
39 |
-
RUN mkdir -p /.ollama && chmod 777 /.ollama
|
40 |
-
WORKDIR /.ollama
|
41 |
# Copy the entry point script
|
42 |
COPY entrypoint.sh /entrypoint.sh
|
43 |
RUN chmod +x /entrypoint.sh
|
44 |
-
# Set the model as an environment variable (this can be overridden)
|
45 |
-
# Copy the init script
|
46 |
-
#COPY init.sh /app/init.sh
|
47 |
-
#RUN chmod +x /app/init.sh
|
48 |
-
# Set the entry point script as the default command
|
49 |
ENTRYPOINT ["/entrypoint.sh"]
|
50 |
CMD ["ollama", "serve"]
|
51 |
|
|
|
5 |
COPY requirements.txt requirements.txt
|
6 |
# Create a virtual environment
|
7 |
RUN python -m venv venv
|
|
|
8 |
# Set the PATH to use the virtual environment
|
9 |
ENV PATH="/app/venv/bin:$PATH"
|
|
|
10 |
# Update package list and install necessary packages in a single step
|
11 |
RUN apt-get update && apt-get install -y \
|
12 |
curl \
|
|
|
17 |
tini \
|
18 |
systemd && \
|
19 |
apt-get clean
|
|
|
20 |
# Upgrade pip and install dependencies
|
21 |
RUN python -m pip install --upgrade pip
|
22 |
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
23 |
# Install Ollama
|
24 |
RUN curl -fsSL https://ollama.com/install.sh | sh
|
25 |
+
RUN mkdir -p /.ollama && chmod 777 /.ollama
|
26 |
+
WORKDIR /.ollama
|
27 |
RUN which ollama
|
28 |
# Expose the port the application uses (replace 11434 with the actual port)
|
29 |
EXPOSE 11434
|
|
|
32 |
# Set proper permissions for the translations directory
|
33 |
RUN chmod -R 777 translations
|
34 |
|
|
|
|
|
|
|
|
|
35 |
# Copy the entry point script
|
36 |
COPY entrypoint.sh /entrypoint.sh
|
37 |
RUN chmod +x /entrypoint.sh
|
|
|
|
|
|
|
|
|
|
|
38 |
ENTRYPOINT ["/entrypoint.sh"]
|
39 |
CMD ["ollama", "serve"]
|
40 |
|