Spaces:
Running
Running
rajeshchoudharyt
commited on
Commit
·
fd9ae66
1
Parent(s):
50733bc
update dockerfile
Browse files- Dockerfile +5 -4
Dockerfile
CHANGED
@@ -1,17 +1,18 @@
|
|
1 |
FROM python:3.10.13
|
2 |
|
|
|
|
|
3 |
RUN useradd -m -u 1000 user
|
4 |
USER user
|
5 |
|
|
|
|
|
6 |
# Copy the current directory contents into the container at .
|
7 |
COPY --chown=user . .
|
8 |
|
9 |
-
# Set the working directory to /
|
10 |
-
WORKDIR /
|
11 |
-
|
12 |
# Install requirements.txt
|
13 |
RUN pip install --upgrade pip
|
14 |
-
RUN pip install -r /requirements.txt
|
15 |
|
16 |
# Start the FastAPI app on port 7860, the default port expected by Spaces
|
17 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
1 |
FROM python:3.10.13
|
2 |
|
3 |
+
WORKDIR /
|
4 |
+
|
5 |
RUN useradd -m -u 1000 user
|
6 |
USER user
|
7 |
|
8 |
+
WORKDIR /user
|
9 |
+
|
10 |
# Copy the current directory contents into the container at .
|
11 |
COPY --chown=user . .
|
12 |
|
|
|
|
|
|
|
13 |
# Install requirements.txt
|
14 |
RUN pip install --upgrade pip
|
15 |
+
RUN pip install --no-cache-dir --upgrade -r /requirements.txt
|
16 |
|
17 |
# Start the FastAPI app on port 7860, the default port expected by Spaces
|
18 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|