Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +18 -1
Dockerfile
CHANGED
@@ -1,11 +1,25 @@
|
|
1 |
FROM python:3.11
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
WORKDIR /code
|
4 |
|
5 |
COPY ./requirements.txt /code/requirements.txt
|
6 |
|
7 |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
8 |
|
|
|
|
|
|
|
9 |
# Set up a new user named "user" with user ID 1000
|
10 |
RUN useradd -m -u 1000 user
|
11 |
# Switch to the "user" user
|
@@ -20,6 +34,9 @@ WORKDIR $HOME/app
|
|
20 |
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
|
21 |
COPY --chown=user . $HOME/app
|
22 |
|
|
|
|
|
|
|
23 |
EXPOSE 7860
|
24 |
|
25 |
-
CMD python3 -u app.py
|
|
|
1 |
FROM python:3.11
|
2 |
|
3 |
+
# Install Milvus
|
4 |
+
USER root
|
5 |
+
RUN apt-get update && \
|
6 |
+
apt-get install -y sudo && \
|
7 |
+
sudo apt-get update && \
|
8 |
+
sudo dpkg -i milvus_2.3.7-1_amd64.deb && \
|
9 |
+
sudo apt-get -f install && \
|
10 |
+
apt-get clean && \
|
11 |
+
rm -rf /var/lib/apt/lists/*
|
12 |
+
USER user
|
13 |
+
|
14 |
WORKDIR /code
|
15 |
|
16 |
COPY ./requirements.txt /code/requirements.txt
|
17 |
|
18 |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
19 |
|
20 |
+
# Install numpy and pymilvus
|
21 |
+
RUN pip install numpy pymilvus
|
22 |
+
|
23 |
# Set up a new user named "user" with user ID 1000
|
24 |
RUN useradd -m -u 1000 user
|
25 |
# Switch to the "user" user
|
|
|
34 |
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
|
35 |
COPY --chown=user . $HOME/app
|
36 |
|
37 |
+
# Download the hello_milvus.py script
|
38 |
+
RUN wget https://raw.githubusercontent.com/milvus-io/pymilvus/master/examples/hello_milvus.py
|
39 |
+
|
40 |
EXPOSE 7860
|
41 |
|
42 |
+
CMD python3 -u app.py
|