Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +7 -7
Dockerfile
CHANGED
@@ -1,13 +1,16 @@
|
|
1 |
# Builder stage
|
2 |
FROM ubuntu:latest
|
3 |
|
4 |
-
# Update packages and install
|
5 |
RUN apt-get update && apt-get install -y \
|
6 |
curl \
|
7 |
gnupg \
|
8 |
python3 \
|
9 |
python3-pip
|
10 |
|
|
|
|
|
|
|
11 |
# Add NVIDIA package repositories
|
12 |
RUN curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg \
|
13 |
&& echo "deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://nvidia.github.io/libnvidia-container/stable/deb/ $(. /etc/os-release; echo $UBUNTU_CODENAME) main" > /etc/apt/sources.list.d/nvidia-container-toolkit.list
|
@@ -18,9 +21,6 @@ RUN apt-get update && apt-get install -y nvidia-container-toolkit || true
|
|
18 |
# Install Ollama
|
19 |
RUN curl https://ollama.ai/install.sh | sh
|
20 |
|
21 |
-
# Fix embedding bug (optional)
|
22 |
-
# RUN curl -fsSL https://ollama.com/install.sh | sed 's#https://ollama.com/download#https://github.com/jmorganca/ollama/releases/download/v0.1.29#' | sh
|
23 |
-
|
24 |
# Create the directory and give appropriate permissions
|
25 |
RUN mkdir -p /.ollama && chmod 777 /.ollama
|
26 |
|
@@ -33,8 +33,8 @@ RUN chmod +x /entrypoint.sh
|
|
33 |
# Copy the application script
|
34 |
COPY app.py /app.py
|
35 |
|
|
|
|
|
|
|
36 |
# Set the entry point script as the default command
|
37 |
ENTRYPOINT ["/entrypoint.sh"]
|
38 |
-
|
39 |
-
# Expose the server port
|
40 |
-
EXPOSE 7860
|
|
|
1 |
# Builder stage
|
2 |
FROM ubuntu:latest
|
3 |
|
4 |
+
# Update packages and install dependencies
|
5 |
RUN apt-get update && apt-get install -y \
|
6 |
curl \
|
7 |
gnupg \
|
8 |
python3 \
|
9 |
python3-pip
|
10 |
|
11 |
+
# Install required Python packages
|
12 |
+
RUN pip3 install streamlit requests
|
13 |
+
|
14 |
# Add NVIDIA package repositories
|
15 |
RUN curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg \
|
16 |
&& echo "deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://nvidia.github.io/libnvidia-container/stable/deb/ $(. /etc/os-release; echo $UBUNTU_CODENAME) main" > /etc/apt/sources.list.d/nvidia-container-toolkit.list
|
|
|
21 |
# Install Ollama
|
22 |
RUN curl https://ollama.ai/install.sh | sh
|
23 |
|
|
|
|
|
|
|
24 |
# Create the directory and give appropriate permissions
|
25 |
RUN mkdir -p /.ollama && chmod 777 /.ollama
|
26 |
|
|
|
33 |
# Copy the application script
|
34 |
COPY app.py /app.py
|
35 |
|
36 |
+
# Expose the Streamlit app port
|
37 |
+
EXPOSE 7860
|
38 |
+
|
39 |
# Set the entry point script as the default command
|
40 |
ENTRYPOINT ["/entrypoint.sh"]
|
|
|
|
|
|