File size: 1,198 Bytes
70c89ac
 
b398843
 
2386bc5
ff5f0ad
 
 
b398843
ff5f0ad
 
70c89ac
 
 
 
2386bc5
b398843
70c89ac
 
2386bc5
70c89ac
 
2386bc5
70c89ac
 
 
 
 
 
 
 
 
 
2386bc5
 
b398843
84c06b3
2386bc5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
FROM python:3.11

# Install Milvus
USER root
RUN apt-get update && apt-get install -y wget ffmpeg libsm6 libxext6 libaio1 
RUN wget https://github.com/milvus-io/milvus/releases/download/v2.3.7/milvus_2.3.7-1_amd64.deb && \
    dpkg -i milvus_2.3.7-1_amd64.deb && \
    apt-get -f install && \
    apt-get clean && \
    rm milvus_2.3.7-1_amd64.deb

WORKDIR /code
COPY ./requirements.txt /code/requirements.txt
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt

# No need to install numpy separately, it's likely in requirements.txt

# Set up a new user named "user" with user ID 1000
RUN useradd -m -u 1000 user

# Switch to the "user" user
USER user

# Set home to the user's home directory
ENV HOME=/home/user \
	PATH=/home/user/.local/bin:$PATH

# Set the working directory to the user's home directory
WORKDIR $HOME/app

# Copy the current directory contents into the container at $HOME/app setting the owner to the user
COPY --chown=user . $HOME/app

# Download the CORRECT hello_milvus.py script (no longer needed in this scenario)
# RUN wget https://raw.githubusercontent.com/milvus-io/pymilvus-orm/main/examples/hello_milvus.py

EXPOSE 7860 19530 2379
CMD python3 -u app.py