Sharathhebbar24
commited on
Commit
•
76aacb4
1
Parent(s):
291659a
Update Dockerfile
Browse files- Dockerfile +22 -22
Dockerfile
CHANGED
@@ -1,43 +1,43 @@
|
|
1 |
|
2 |
FROM python:3.11
|
3 |
|
4 |
-
|
5 |
|
6 |
-
|
7 |
|
8 |
-
|
9 |
|
10 |
-
|
11 |
|
12 |
-
|
13 |
|
14 |
-
|
15 |
-
|
16 |
|
17 |
-
|
18 |
|
19 |
-
|
20 |
|
21 |
-
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
-
WORKDIR /
|
27 |
|
28 |
-
COPY ./requirements.txt /requirements.txt
|
29 |
-
# RUN apt-get update && apt-get install -y build-essential libpq-dev \
|
30 |
-
# && python -m pip install --upgrade pip \
|
31 |
-
# && pip install --no-cache-dir -r /requirements.txt
|
32 |
-
RUN pip install --no-cache-dir --upgrade -r /requirements.txt
|
33 |
|
34 |
|
35 |
-
# RUN useradd -m -u 1000 user
|
36 |
-
# ENV HOME=/home/user \
|
37 |
-
# PATH=/home/user/.local/bin:$PATH
|
38 |
|
39 |
-
# COPY --chown=user .
|
40 |
|
41 |
-
COPY ./ /
|
42 |
|
43 |
-
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "80"]
|
|
|
1 |
|
2 |
FROM python:3.11
|
3 |
|
4 |
+
WORKDIR /code
|
5 |
|
6 |
+
COPY ./requirements.txt /code/requirements.txt
|
7 |
|
8 |
+
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
9 |
|
10 |
+
RUN useradd -m -u 1000 user
|
11 |
|
12 |
+
USER user
|
13 |
|
14 |
+
ENV HOME=/home/user \
|
15 |
+
PATH=/home/user/.local/bin:$PATH
|
16 |
|
17 |
+
WORKDIR $HOME/app
|
18 |
|
19 |
+
COPY --chown=user . $HOME/app
|
20 |
|
21 |
+
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
+
# WORKDIR /
|
27 |
|
28 |
+
# COPY ./requirements.txt /requirements.txt
|
29 |
+
# # RUN apt-get update && apt-get install -y build-essential libpq-dev \
|
30 |
+
# # && python -m pip install --upgrade pip \
|
31 |
+
# # && pip install --no-cache-dir -r /requirements.txt
|
32 |
+
# RUN pip install --no-cache-dir --upgrade -r /requirements.txt
|
33 |
|
34 |
|
35 |
+
# # RUN useradd -m -u 1000 user
|
36 |
+
# # ENV HOME=/home/user \
|
37 |
+
# # PATH=/home/user/.local/bin:$PATH
|
38 |
|
39 |
+
# # COPY --chown=user .
|
40 |
|
41 |
+
# COPY ./ /
|
42 |
|
43 |
+
# CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "80"]
|