jonathanjordan21 commited on
Commit
166d06d
·
verified ·
1 Parent(s): ea9f027

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +27 -11
Dockerfile CHANGED
@@ -1,16 +1,32 @@
1
- # Read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker
2
- # you will also find guides on how best to write your Dockerfile
3
 
4
- FROM python:3.9
 
 
5
 
6
- RUN useradd -m -u 1000 user
7
- USER user
8
- ENV PATH="/home/user/.local/bin:$PATH"
 
 
 
 
 
 
9
 
10
- WORKDIR /app
 
 
11
 
12
- COPY --chown=user ./requirements.txt requirements.txt
13
- RUN pip install --no-cache-dir --upgrade -r requirements.txt
 
 
 
14
 
15
- COPY --chown=user . /app
16
- CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
 
 
 
1
+ # Use an official Ubuntu base image
2
+ FROM ubuntu:20.04
3
 
4
+ # Set environment variables
5
+ ENV DEBIAN_FRONTEND=noninteractive
6
+ ENV TZ=Asia/Jakarta
7
 
8
+ # Install dependencies
9
+ RUN apt-get update && \
10
+ apt-get install -y \
11
+ curl \
12
+ ca-certificates \
13
+ gnupg \
14
+ lsb-release \
15
+ sudo && \
16
+ rm -rf /var/lib/apt/lists/*
17
 
18
+ # Install Docker in the container (to use Docker CLI if needed)
19
+ RUN apt-get update && \
20
+ apt-get install -y docker.io
21
 
22
+ # Install Milvus standalone with the provided script
23
+ RUN curl -sfL https://raw.githubusercontent.com/milvus-io/milvus/master/scripts/standalone_embed.sh -o standalone_embed.sh && \
24
+ chmod +x standalone_embed.sh && \
25
+ ./standalone_embed.sh install && \
26
+ rm -f standalone_embed.sh
27
 
28
+ # Expose the default Milvus port
29
+ EXPOSE 19530
30
+
31
+ # Start Milvus on container startup
32
+ CMD ["bash", "-c", "./standalone_embed.sh start && tail -f /dev/null"]