changed
Browse files- Dockerfile +15 -9
Dockerfile
CHANGED
@@ -1,16 +1,22 @@
|
|
1 |
-
|
2 |
-
# you will also find guides on how best to write your Dockerfile
|
3 |
|
4 |
-
|
5 |
|
6 |
-
WORKDIR /
|
7 |
|
8 |
-
|
|
|
|
|
|
|
9 |
|
10 |
-
|
11 |
|
12 |
-
COPY .
|
13 |
|
14 |
-
|
15 |
|
16 |
-
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM python:3.10
|
|
|
2 |
|
3 |
+
RUN apt-get update -y && apt-get install -y build-essential
|
4 |
|
5 |
+
WORKDIR /app
|
6 |
|
7 |
+
RUN useradd -m -u 1000 user
|
8 |
+
USER user
|
9 |
+
ENV HOME=/home/user \
|
10 |
+
PATH=/home/user/.local/bin:$PATH
|
11 |
|
12 |
+
WORKDIR $HOME/app
|
13 |
|
14 |
+
COPY --chown=user . $HOME/app
|
15 |
|
16 |
+
COPY app.py app.py
|
17 |
|
18 |
+
RUN pip install -r requirements.txt
|
19 |
+
#RUN pip3 install torch torchvision --index-url https://download.pytorch.org/whl/cpu
|
20 |
+
|
21 |
+
|
22 |
+
CMD ["gunicorn","-b","0.0.0.0:7860", "app:app","--timeout","950"]
|