Update Dockerfile
Browse files- Dockerfile +9 -7
Dockerfile
CHANGED
@@ -2,11 +2,11 @@
|
|
2 |
|
3 |
FROM python:3.9
|
4 |
|
5 |
-
RUN useradd -m -u 1000 user
|
6 |
-
USER user
|
7 |
ENV PATH="/home/user/.local/bin:/opt/conda/bin:$PATH"
|
8 |
|
9 |
-
WORKDIR /app
|
10 |
|
11 |
ARG PYTORCH_VERSION=2.1.0
|
12 |
ARG PYTHON_VERSION=3.9 #8.10
|
@@ -19,7 +19,7 @@ ARG INSTALL_CHANNEL=pytorch
|
|
19 |
ARG TARGETPLATFORM
|
20 |
|
21 |
|
22 |
-
USER root
|
23 |
|
24 |
# Update basic dependencies we'll be using.
|
25 |
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
@@ -54,13 +54,15 @@ RUN case ${TARGETPLATFORM} in \
|
|
54 |
esac && \
|
55 |
/opt/conda/bin/conda clean -ya
|
56 |
|
57 |
-
COPY --chown=user ./requirements.txt requirements.txt
|
|
|
58 |
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
59 |
|
60 |
#COPY --chown=user teaching_arithmetic /teaching_arithmetic
|
61 |
RUN cd teaching_arithmetic && pip install -e .
|
62 |
-
COPY --chown=user . /app
|
|
|
63 |
|
64 |
-
USER 1000
|
65 |
|
66 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
2 |
|
3 |
FROM python:3.9
|
4 |
|
5 |
+
#RUN useradd -m -u 1000 user
|
6 |
+
#USER user
|
7 |
ENV PATH="/home/user/.local/bin:/opt/conda/bin:$PATH"
|
8 |
|
9 |
+
#WORKDIR /app
|
10 |
|
11 |
ARG PYTORCH_VERSION=2.1.0
|
12 |
ARG PYTHON_VERSION=3.9 #8.10
|
|
|
19 |
ARG TARGETPLATFORM
|
20 |
|
21 |
|
22 |
+
#USER root
|
23 |
|
24 |
# Update basic dependencies we'll be using.
|
25 |
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
|
|
54 |
esac && \
|
55 |
/opt/conda/bin/conda clean -ya
|
56 |
|
57 |
+
#COPY --chown=user ./requirements.txt requirements.txt
|
58 |
+
COPY ./requirements.txt requirements.txt
|
59 |
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
60 |
|
61 |
#COPY --chown=user teaching_arithmetic /teaching_arithmetic
|
62 |
RUN cd teaching_arithmetic && pip install -e .
|
63 |
+
#COPY --chown=user . /app
|
64 |
+
COPY . /app
|
65 |
|
66 |
+
# USER 1000
|
67 |
|
68 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|