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