Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +5 -21
Dockerfile
CHANGED
|
@@ -4,29 +4,13 @@ RUN apt-get update && apt-get install -y build-essential curl git && rm -rf /var
|
|
| 4 |
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
-
# Create
|
| 8 |
-
RUN useradd -m -u 1000 user
|
| 9 |
-
|
| 10 |
-
# Create the github_repo directory
|
| 11 |
RUN mkdir /app/github_repo
|
| 12 |
|
| 13 |
-
#
|
| 14 |
-
|
| 15 |
-
chown -R user:user /app/github_repo
|
| 16 |
-
|
| 17 |
-
# Switch to the non-root user
|
| 18 |
-
USER user
|
| 19 |
-
|
| 20 |
-
# Update PATH to ensure local bin is included
|
| 21 |
-
ENV PATH=/home/user/.local/bin:$PATH
|
| 22 |
-
|
| 23 |
-
# Copy application files as the non-root user to avoid permission issues
|
| 24 |
-
COPY --chown=user:user . /app
|
| 25 |
|
| 26 |
# Install dependencies
|
| 27 |
-
RUN pip install --upgrade pip && pip install
|
| 28 |
-
|
| 29 |
-
#EXPOSE 8501
|
| 30 |
-
#I commented out EXPOSE 8501, and gave 7860 in CMD, since it works. Funny? The building of Streamlit never stops with 8501!!!
|
| 31 |
|
| 32 |
-
ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"]
|
|
|
|
| 4 |
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
+
# Create the github_repo directory directly without specifying user permissions
|
|
|
|
|
|
|
|
|
|
| 8 |
RUN mkdir /app/github_repo
|
| 9 |
|
| 10 |
+
# Copy application files directly without specifying user permissions
|
| 11 |
+
COPY . /app
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
|
| 13 |
# Install dependencies
|
| 14 |
+
RUN pip install --upgrade pip && pip install -r requirements.txt
|
|
|
|
|
|
|
|
|
|
| 15 |
|
| 16 |
+
ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"]
|