Spaces:
Runtime error
Runtime error
Commit
•
71aedb3
1
Parent(s):
b66d27e
Create Dockerfile
Browse files- Dockerfile +25 -0
Dockerfile
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM python:3.9
|
2 |
+
|
3 |
+
WORKDIR /code
|
4 |
+
|
5 |
+
COPY ./requirements.txt /code/requirements.txt
|
6 |
+
|
7 |
+
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
8 |
+
|
9 |
+
# Git LFS
|
10 |
+
RUN apt-get update && apt-get install -y git-lfs
|
11 |
+
RUN git lfs install
|
12 |
+
|
13 |
+
|
14 |
+
# User
|
15 |
+
RUN useradd -m -u 1000 user
|
16 |
+
USER user
|
17 |
+
ENV HOME /home/user
|
18 |
+
ENV PATH $HOME/.local/bin:$PATH
|
19 |
+
WORKDIR $HOME
|
20 |
+
RUN mkdir app
|
21 |
+
WORKDIR $HOME/app
|
22 |
+
|
23 |
+
COPY . $HOME/app
|
24 |
+
|
25 |
+
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|