kadabengaran commited on
Commit
522861a
·
verified ·
1 Parent(s): af3479c

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +32 -11
Dockerfile CHANGED
@@ -1,16 +1,37 @@
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
+ FROM milvusdb/milvus:v2.5.6 AS milvus_src
 
2
 
3
+ FROM regulaforensics/face-api:latest
4
+ USER root
5
 
6
+ RUN apt-get update && apt-get install -y --no-install-recommends \
7
+ ca-certificates curl bash supervisor nginx \
8
+ postgresql postgresql-contrib \
9
+ && rm -rf /var/lib/apt/lists/*
10
 
11
+ RUN curl -fsSL https://dl.min.io/server/minio/release/linux-amd64/minio -o /usr/local/bin/minio \
12
+ && chmod +x /usr/local/bin/minio
13
 
14
+ RUN curl -fsSL https://github.com/etcd-io/etcd/releases/download/v3.5.5/etcd-v3.5.5-linux-amd64.tar.gz -o /tmp/etcd.tgz \
15
+ && tar -xzf /tmp/etcd.tgz -C /tmp \
16
+ && mv /tmp/etcd-v3.5.5-linux-amd64/etcd /usr/local/bin/etcd \
17
+ && mv /tmp/etcd-v3.5.5-linux-amd64/etcdctl /usr/local/bin/etcdctl \
18
+ && rm -rf /tmp/etcd* /tmp/etcd.tgz
19
 
20
+ COPY --from=milvus_src /tini /tini
21
+ COPY --from=milvus_src /usr/bin/milvus /usr/local/bin/milvus
22
+
23
+ COPY nginx.conf /etc/nginx/nginx.conf
24
+ COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
25
+ COPY start.sh /start.sh
26
+ COPY init-postgres.sh /init-postgres.sh
27
+ COPY config.yaml /app/config.yaml
28
+
29
+ RUN chmod +x /start.sh /init-postgres.sh
30
+
31
+ RUN mkdir -p /data/postgres /data/minio /data/etcd /data/milvus \
32
+ && chown -R postgres:postgres /data/postgres
33
+
34
+ EXPOSE 7860
35
+
36
+ ENTRYPOINT ["/tini", "--"]
37
+ CMD ["/start.sh"]