genstava789 commited on
Commit ·
32e83ad
1
Parent(s): ad673a7
update
Browse files- Dockerfile +4 -4
Dockerfile
CHANGED
|
@@ -50,6 +50,10 @@ RUN git clone git@hf.co:spaces/nexus4rd/ngrok /app/repo \
|
|
| 50 |
# Create a user for running the application
|
| 51 |
RUN useradd -m -u 1000 user
|
| 52 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 53 |
# Switch to the newly created user
|
| 54 |
USER user
|
| 55 |
ENV PATH="/home/user/.local/bin:$PATH"
|
|
@@ -61,10 +65,6 @@ RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
|
| 61 |
# Copy the rest of the application code
|
| 62 |
COPY --chown=user:user . .
|
| 63 |
|
| 64 |
-
# Ensure the cookies directory exists and is writable
|
| 65 |
-
RUN mkdir -p /app/cookies && \
|
| 66 |
-
chmod 755 /app/cookies
|
| 67 |
-
|
| 68 |
EXPOSE 7860
|
| 69 |
|
| 70 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
|
| 50 |
# Create a user for running the application
|
| 51 |
RUN useradd -m -u 1000 user
|
| 52 |
|
| 53 |
+
# Ensure the cookies directory exists and is writable by the user
|
| 54 |
+
RUN mkdir -p /app/cookies && \
|
| 55 |
+
chown -R user:user /app/cookies
|
| 56 |
+
|
| 57 |
# Switch to the newly created user
|
| 58 |
USER user
|
| 59 |
ENV PATH="/home/user/.local/bin:$PATH"
|
|
|
|
| 65 |
# Copy the rest of the application code
|
| 66 |
COPY --chown=user:user . .
|
| 67 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 68 |
EXPOSE 7860
|
| 69 |
|
| 70 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|