Janady07 commited on
Commit
073bfab
·
verified ·
1 Parent(s): e388c99

Direct CMD without shell script

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -3
Dockerfile CHANGED
@@ -1,12 +1,17 @@
1
  FROM python:3.11-slim
 
2
  RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates curl && rm -rf /var/lib/apt/lists/*
 
3
  RUN useradd -m -u 1000 megamind
4
  WORKDIR /app
5
  RUN mkdir -p /app/data && chown -R megamind:megamind /app
 
6
  COPY maddie /app/maddie
7
- COPY start.sh /app/start.sh
8
- RUN chmod +x /app/maddie /app/start.sh
9
  USER megamind
10
  EXPOSE 7860
 
11
  HEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=3 CMD curl -sf http://localhost:7860/health || exit 1
12
- CMD ["/app/start.sh"]
 
 
1
  FROM python:3.11-slim
2
+
3
  RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates curl && rm -rf /var/lib/apt/lists/*
4
+
5
  RUN useradd -m -u 1000 megamind
6
  WORKDIR /app
7
  RUN mkdir -p /app/data && chown -R megamind:megamind /app
8
+
9
  COPY maddie /app/maddie
10
+ RUN chmod +x /app/maddie
11
+
12
  USER megamind
13
  EXPOSE 7860
14
+
15
  HEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=3 CMD curl -sf http://localhost:7860/health || exit 1
16
+
17
+ CMD ["/app/maddie", "-port", "7860", "-data", "/app/data"]