jaothan commited on
Commit
36b700d
·
verified ·
1 Parent(s): fc98039

Update app.Dockerfile

Browse files
Files changed (1) hide show
  1. app.Dockerfile +30 -21
app.Dockerfile CHANGED
@@ -1,21 +1,30 @@
1
- FROM langchain/langchain
2
-
3
- WORKDIR /app
4
-
5
- RUN apt-get update && apt-get install -y \
6
- build-essential \
7
- curl \
8
- software-properties-common \
9
- && rm -rf /var/lib/apt/lists/*
10
-
11
- COPY requirements.txt .
12
-
13
- RUN pip install --upgrade -r requirements.txt
14
-
15
- COPY api.py .
16
- COPY utils.py .
17
- COPY chains.py .
18
-
19
- HEALTHCHECK CMD curl --fail http://localhost:8504
20
-
21
- ENTRYPOINT [ "uvicorn", "api:app", "--host", "0.0.0.0", "--port", "8504" ]
 
 
 
 
 
 
 
 
 
 
1
+ FROM langchain/langchain
2
+
3
+ WORKDIR /app
4
+
5
+ RUN apt-get update && apt-get install -y \
6
+ build-essential \
7
+ curl \
8
+ software-properties-common \
9
+ && rm -rf /var/lib/apt/lists/*
10
+
11
+ COPY requirements.txt .
12
+
13
+ RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
14
+
15
+ RUN useradd user
16
+ USER user
17
+ ENV HOME=/home/user \
18
+ PATH=/home/user/.local/bin:$PATH
19
+
20
+ WORKDIR $HOME/app
21
+
22
+ COPY --chown=user . $HOME/app
23
+ COPY api.py .
24
+ COPY utils.py .
25
+ COPY chains.py .
26
+
27
+
28
+ HEALTHCHECK CMD curl --fail http://localhost:8504
29
+
30
+ ENTRYPOINT [ "uvicorn", "api:app", "--host", "0.0.0.0", "--port", "8504" ]