Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +21 -29
Dockerfile
CHANGED
|
@@ -1,35 +1,27 @@
|
|
| 1 |
-
#
|
| 2 |
-
FROM
|
| 3 |
|
| 4 |
-
#
|
| 5 |
-
|
| 6 |
-
|
| 7 |
|
| 8 |
-
#
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
ca-certificates \
|
| 13 |
-
gnupg \
|
| 14 |
-
lsb-release \
|
| 15 |
-
sudo \
|
| 16 |
-
apt-transport-https && \
|
| 17 |
-
rm -rf /var/lib/apt/lists/*
|
| 18 |
|
| 19 |
-
#
|
| 20 |
-
|
| 21 |
-
|
|
|
|
|
|
|
| 22 |
|
| 23 |
-
#
|
| 24 |
-
|
| 25 |
-
RUN chmod +x /standalone_embed.sh
|
| 26 |
|
| 27 |
-
#
|
| 28 |
-
|
| 29 |
-
|
| 30 |
|
| 31 |
-
#
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
# Start Milvus on container startup
|
| 35 |
-
CMD ["bash", "-c", "/standalone_embed.sh start && tail -f /dev/null"]
|
|
|
|
| 1 |
+
# Start from the Milvus base image
|
| 2 |
+
FROM milvusdb/milvus:v2.4.15
|
| 3 |
|
| 4 |
+
# Create required directories and set permissions
|
| 5 |
+
RUN mkdir -p /var/lib/milvus /milvus/configs && \
|
| 6 |
+
chmod -R 777 /var/lib/milvus /milvus/configs
|
| 7 |
|
| 8 |
+
# Copy necessary configuration files
|
| 9 |
+
# Assumes embedEtcd.yaml and user.yaml are in the build context
|
| 10 |
+
COPY embedEtcd.yaml /milvus/configs/embedEtcd.yaml
|
| 11 |
+
COPY user.yaml /milvus/configs/user.yaml
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
|
| 13 |
+
# Environment variables required for Milvus standalone setup
|
| 14 |
+
ENV ETCD_USE_EMBED=true
|
| 15 |
+
ENV ETCD_DATA_DIR=/var/lib/milvus/etcd
|
| 16 |
+
ENV ETCD_CONFIG_PATH=/milvus/configs/embedEtcd.yaml
|
| 17 |
+
ENV COMMON_STORAGETYPE=local
|
| 18 |
|
| 19 |
+
# Expose necessary ports for Milvus
|
| 20 |
+
EXPOSE 19530 9091 2379
|
|
|
|
| 21 |
|
| 22 |
+
# Health check command to monitor Milvus status
|
| 23 |
+
HEALTHCHECK --interval=30s --timeout=20s --start-period=90s --retries=3 \
|
| 24 |
+
CMD curl -f http://localhost:9091/healthz || exit 1
|
| 25 |
|
| 26 |
+
# Command to start Milvus in standalone mode
|
| 27 |
+
CMD ["milvus", "run", "standalone"]
|
|
|
|
|
|
|
|
|