Koalar commited on
Commit
c24b41d
·
verified ·
1 Parent(s): cc931eb

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +38 -38
Dockerfile CHANGED
@@ -1,38 +1,38 @@
1
- # syntax=docker/dockerfile:1
2
- FROM python:3.11-slim AS app
3
-
4
- # Minimal env
5
- ENV PYTHONDONTWRITEBYTECODE=1 \
6
- PYTHONUNBUFFERED=1 \
7
- PIP_NO_CACHE_DIR=1 \
8
- GRADIO_SERVER_NAME=0.0.0.0 \
9
- GRADIO_SERVER_PORT=8080 \
10
- PORT=8080
11
-
12
- # Allow overriding entry script
13
- ARG APP_FILE=gui/chatbot_dev_app.py
14
- ENV APP_FILE=${APP_FILE}
15
-
16
- WORKDIR /app
17
-
18
- # OS deps (git is often needed for pip VCS URLs)
19
- RUN apt-get update \
20
- && apt-get install -y --no-install-recommends git \
21
- && rm -rf /var/lib/apt/lists/*
22
-
23
- COPY pyproject.toml README.md LICENSE ./
24
-
25
- RUN python -m pip install --upgrade pip setuptools wheel
26
-
27
- # Bring in source last to avoid invalidating earlier cache layers
28
- COPY src ./src
29
- COPY gui ./gui
30
- COPY scripts ./scripts
31
-
32
- # Install your package
33
- RUN pip install --no-cache-dir .
34
-
35
- EXPOSE 8080
36
-
37
- # Launch the chosen app file; App Runner sets $PORT for us
38
- CMD ["sh", "-c", "python $APP_FILE"]
 
1
+ # syntax=docker/dockerfile:1
2
+ FROM python:3.11-slim AS app
3
+
4
+ # Minimal env
5
+ ENV PYTHONDONTWRITEBYTECODE=1 \
6
+ PYTHONUNBUFFERED=1 \
7
+ PIP_NO_CACHE_DIR=1 \
8
+ GRADIO_SERVER_NAME=0.0.0.0 \
9
+ GRADIO_SERVER_PORT=8080 \
10
+ PORT=8080
11
+
12
+ # Allow overriding entry script
13
+ ARG APP_FILE=gui/chatbot_demo.py
14
+ ENV APP_FILE=${APP_FILE}
15
+
16
+ WORKDIR /app
17
+
18
+ # OS deps (git is often needed for pip VCS URLs)
19
+ RUN apt-get update \
20
+ && apt-get install -y --no-install-recommends git \
21
+ && rm -rf /var/lib/apt/lists/*
22
+
23
+ COPY pyproject.toml README.md LICENSE ./
24
+
25
+ RUN python -m pip install --upgrade pip setuptools wheel
26
+
27
+ # Bring in source last to avoid invalidating earlier cache layers
28
+ COPY src ./src
29
+ COPY gui ./gui
30
+ COPY scripts ./scripts
31
+
32
+ # Install your package
33
+ RUN pip install --no-cache-dir .
34
+
35
+ EXPOSE 8080
36
+
37
+ # Launch the chosen app file; App Runner sets $PORT for us
38
+ CMD ["sh", "-c", "python $APP_FILE"]