Milvus-Embedding / Dockerfile
ruslanmv's picture
Update Dockerfile
84c06b3 verified
raw
history blame
1.14 kB
FROM python:3.11
# Install Milvus
USER root
RUN apt-get update && apt-get install ffmpeg libsm6 libxext6 libaio1 -y
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
# Install numpy and pymilvus
RUN pip install numpy pymilvus
# 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 hello_milvus.py script
RUN wget https://raw.githubusercontent.com/milvus-io/pymilvus/master/examples/hello_milvus.py
EXPOSE 7860 19530 2379
CMD python3 -u app.py