Spaces:
Runtime error
Runtime error
Create Dockerfile
Browse files- Dockerfile +17 -0
Dockerfile
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM python:3.9
|
2 |
+
|
3 |
+
# WORKDIR /code
|
4 |
+
WORKDIR $HOME/app
|
5 |
+
|
6 |
+
COPY ./requirements.txt /app/requirements.txt
|
7 |
+
|
8 |
+
RUN pip install --no-cache-dir --upgrade -r /app/requirements.txt
|
9 |
+
|
10 |
+
RUN useradd -m -u 1000 user
|
11 |
+
USER user
|
12 |
+
ENV HOME=/home/user \
|
13 |
+
PATH=/home/user/.local/bin:$PATH
|
14 |
+
|
15 |
+
COPY --chown=user . $HOME/app
|
16 |
+
|
17 |
+
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
|