Spaces:
Runtime error
Runtime error
updates
Browse files- Dockerfile +6 -7
- start.sh +2 -1
Dockerfile
CHANGED
|
@@ -27,17 +27,16 @@ RUN wget https://www.sqlite.org/2021/sqlite-autoconf-3360000.tar.gz && \
|
|
| 27 |
# Verify sqlite3 version system-wide
|
| 28 |
RUN sqlite3 --version
|
| 29 |
|
| 30 |
-
|
| 31 |
-
|
| 32 |
# Install Python dependencies
|
| 33 |
RUN pip install poetry gradio
|
| 34 |
|
| 35 |
-
# After installing dependencies, check SQLite version in Python
|
| 36 |
-
RUN python -c "import sqlite3; print('Python SQLite version:', sqlite3.sqlite_version)"
|
| 37 |
-
|
| 38 |
# Create a non-root user and change ownership of the /app directory
|
| 39 |
-
RUN adduser --disabled-password --gecos '' myuser
|
| 40 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 41 |
|
| 42 |
# Switch to the non-root user
|
| 43 |
USER myuser
|
|
|
|
| 27 |
# Verify sqlite3 version system-wide
|
| 28 |
RUN sqlite3 --version
|
| 29 |
|
|
|
|
|
|
|
| 30 |
# Install Python dependencies
|
| 31 |
RUN pip install poetry gradio
|
| 32 |
|
|
|
|
|
|
|
|
|
|
| 33 |
# Create a non-root user and change ownership of the /app directory
|
| 34 |
+
RUN adduser --disabled-password --gecos '' myuser
|
| 35 |
+
|
| 36 |
+
# Change ownership and permissions before switching to myuser
|
| 37 |
+
RUN chown -R myuser:myuser /app && chmod -R 755 /app && \
|
| 38 |
+
mkdir -p /app/.cache && chown myuser:myuser /app/.cache && \
|
| 39 |
+
chmod 777 /tmp
|
| 40 |
|
| 41 |
# Switch to the non-root user
|
| 42 |
USER myuser
|
start.sh
CHANGED
|
@@ -23,12 +23,13 @@ cd ..
|
|
| 23 |
cd /app/olas-predict-benchmark/benchmark/mech
|
| 24 |
git fetch --all
|
| 25 |
git checkout main || echo "Switching to 'main'."
|
| 26 |
-
cd
|
| 27 |
|
| 28 |
# Configure poetry to create virtual environments within the project directory
|
| 29 |
poetry config virtualenvs.in-project true
|
| 30 |
|
| 31 |
cd /app
|
|
|
|
| 32 |
# If pyproject.toml has changed significantly, update dependencies
|
| 33 |
poetry lock --no-update
|
| 34 |
|
|
|
|
| 23 |
cd /app/olas-predict-benchmark/benchmark/mech
|
| 24 |
git fetch --all
|
| 25 |
git checkout main || echo "Switching to 'main'."
|
| 26 |
+
cd ../../..
|
| 27 |
|
| 28 |
# Configure poetry to create virtual environments within the project directory
|
| 29 |
poetry config virtualenvs.in-project true
|
| 30 |
|
| 31 |
cd /app
|
| 32 |
+
|
| 33 |
# If pyproject.toml has changed significantly, update dependencies
|
| 34 |
poetry lock --no-update
|
| 35 |
|