Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +7 -9
Dockerfile
CHANGED
@@ -2,7 +2,7 @@ FROM python:3.11
|
|
2 |
|
3 |
# Install Milvus
|
4 |
USER root
|
5 |
-
RUN apt-get update && apt-get install ffmpeg libsm6 libxext6 libaio1
|
6 |
RUN wget https://github.com/milvus-io/milvus/releases/download/v2.3.7/milvus_2.3.7-1_amd64.deb && \
|
7 |
dpkg -i milvus_2.3.7-1_amd64.deb && \
|
8 |
apt-get -f install && \
|
@@ -10,18 +10,17 @@ RUN wget https://github.com/milvus-io/milvus/releases/download/v2.3.7/milvus_2.3
|
|
10 |
rm milvus_2.3.7-1_amd64.deb
|
11 |
|
12 |
WORKDIR /code
|
13 |
-
|
14 |
COPY ./requirements.txt /code/requirements.txt
|
15 |
-
|
16 |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
17 |
|
18 |
-
#
|
19 |
-
RUN pip install numpy pymilvus
|
20 |
|
21 |
# Set up a new user named "user" with user ID 1000
|
22 |
RUN useradd -m -u 1000 user
|
|
|
23 |
# Switch to the "user" user
|
24 |
USER user
|
|
|
25 |
# Set home to the user's home directory
|
26 |
ENV HOME=/home/user \
|
27 |
PATH=/home/user/.local/bin:$PATH
|
@@ -32,9 +31,8 @@ WORKDIR $HOME/app
|
|
32 |
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
|
33 |
COPY --chown=user . $HOME/app
|
34 |
|
35 |
-
# Download the hello_milvus.py script
|
36 |
-
RUN wget https://raw.githubusercontent.com/milvus-io/pymilvus/
|
37 |
|
38 |
EXPOSE 7860 19530 2379
|
39 |
-
|
40 |
-
CMD python3 -u app.py
|
|
|
2 |
|
3 |
# Install Milvus
|
4 |
USER root
|
5 |
+
RUN apt-get update && apt-get install -y wget ffmpeg libsm6 libxext6 libaio1
|
6 |
RUN wget https://github.com/milvus-io/milvus/releases/download/v2.3.7/milvus_2.3.7-1_amd64.deb && \
|
7 |
dpkg -i milvus_2.3.7-1_amd64.deb && \
|
8 |
apt-get -f install && \
|
|
|
10 |
rm milvus_2.3.7-1_amd64.deb
|
11 |
|
12 |
WORKDIR /code
|
|
|
13 |
COPY ./requirements.txt /code/requirements.txt
|
|
|
14 |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
15 |
|
16 |
+
# No need to install numpy separately, it's likely in requirements.txt
|
|
|
17 |
|
18 |
# Set up a new user named "user" with user ID 1000
|
19 |
RUN useradd -m -u 1000 user
|
20 |
+
|
21 |
# Switch to the "user" user
|
22 |
USER user
|
23 |
+
|
24 |
# Set home to the user's home directory
|
25 |
ENV HOME=/home/user \
|
26 |
PATH=/home/user/.local/bin:$PATH
|
|
|
31 |
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
|
32 |
COPY --chown=user . $HOME/app
|
33 |
|
34 |
+
# Download the CORRECT hello_milvus.py script (no longer needed in this scenario)
|
35 |
+
# RUN wget https://raw.githubusercontent.com/milvus-io/pymilvus-orm/main/examples/hello_milvus.py
|
36 |
|
37 |
EXPOSE 7860 19530 2379
|
38 |
+
CMD python3 -u app.py
|
|