Ethanmaht commited on
Commit
a57b8b1
·
verified ·
1 Parent(s): 9b61307

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +1 -47
Dockerfile CHANGED
@@ -1,47 +1 @@
1
- # Build stage
2
- FROM python:3.11-slim-bullseye AS builder
3
-
4
- ENV PYTHONDONTWRITEBYTECODE=1 \
5
- PYTHONUNBUFFERED=1 \
6
- PIP_NO_CACHE_DIR=1 \
7
- DEBIAN_FRONTEND=noninteractive
8
-
9
- WORKDIR /build
10
-
11
- # Install minimal dependencies and Python packages
12
- RUN apt-get update && apt-get install -y --no-install-recommends \
13
- curl \
14
- ca-certificates \
15
- && rm -rf /var/lib/apt/lists/* \
16
- && pip install --upgrade pip
17
-
18
- COPY requirements.txt .
19
- RUN pip install --no-cache-dir -r requirements.txt
20
-
21
- # Runtime stage
22
- FROM python:3.11-slim-bullseye
23
-
24
- ENV PYTHONDONTWRITEBYTECODE=1 \
25
- PYTHONUNBUFFERED=1 \
26
- PORT=7860 \
27
- DEBUG=false
28
-
29
- WORKDIR /app
30
-
31
- # Copy Python packages and application files
32
- COPY --from=builder /usr/local/lib/python3.11/site-packages /usr/local/lib/python3.11/site-packages
33
- COPY more_core.py degpt.py ./
34
-
35
- # Install runtime dependencies
36
- RUN apt-get update && apt-get install -y --no-install-recommends \
37
- curl \
38
- ca-certificates \
39
- && rm -rf /var/lib/apt/lists/*
40
-
41
- # Healthcheck and entrypoint
42
- HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
43
- CMD curl -f http://localhost:${PORT}/health || exit 1
44
-
45
- EXPOSE ${PORT}
46
-
47
- CMD ["python", "more_core.py"]
 
1
+ FROM ghcr.io/hhhaiai/de:latest