FROM python:3.10-slim-buster WORKDIR /app COPY . /app RUN apt-get update && \ apt-get install -y --no-install-recommends git && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* RUN pip install poetry gradio RUN git config --global --add safe.directory /app # # Separately handle submodule update and checks # RUN git submodule init # RUN git submodule update --init --recursive # # Check if the directory exists before attempting to cd # RUN if [ -d "/app/olas-predict-benchmark" ]; then \ # cd /app/olas-predict-benchmark && git checkout fix/mech-packages; \ # fi # RUN if [ -d "/app/olas-predict-benchmark/benchmark/mech" ]; then \ # cd /app/olas-predict-benchmark/benchmark/mech && git checkout main; \ # fi EXPOSE 7860 RUN ls -la /app RUN chmod +x /app/start.sh CMD ["/app/start.sh"]