Commit
·
50733bc
1
Parent(s):
80e5c52
update dockerfile
Browse files- Dockerfile +5 -4
Dockerfile
CHANGED
|
@@ -1,15 +1,16 @@
|
|
| 1 |
FROM python:3.10.13
|
| 2 |
|
|
|
|
|
|
|
|
|
|
| 3 |
# Copy the current directory contents into the container at .
|
| 4 |
-
COPY . .
|
| 5 |
|
| 6 |
# Set the working directory to /
|
| 7 |
WORKDIR /
|
| 8 |
|
| 9 |
-
ENV token=token
|
| 10 |
-
RUN mkdir ./.cache
|
| 11 |
-
|
| 12 |
# Install requirements.txt
|
|
|
|
| 13 |
RUN pip install -r /requirements.txt
|
| 14 |
|
| 15 |
# Start the FastAPI app on port 7860, the default port expected by Spaces
|
|
|
|
| 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
|