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