LATE.IO2 / fix_agentic_errors.sh
AIEONE
Initial commit syncing local server with Hugging Face Space
490ec84
#!/bin/bash
cd ~/late.io
# Create missing scripts directory with placeholder
mkdir -p scripts
touch scripts/__init__.py
cat <<EOF > scripts/execution_engine.py
def execute_agent_logic():
pass
EOF
# Ensure Dockerfile explicitly uses port 7860 internally
cat <<EOF > Dockerfile
FROM python:3.11-slim
WORKDIR /app
COPY ./backend /app/backend
COPY ./routes /app/routes
COPY ./scripts /app/scripts
COPY requirements.txt /app/
RUN pip install --no-cache-dir --upgrade -r requirements.txt
EXPOSE 7860
CMD ["uvicorn", "backend.app:app", "--host", "0.0.0.0", "--port", "7860"]
EOF
# Remove any old containers and images
docker stop agentic-app || true
docker rm agentic-app || true
docker rmi agentic-app:latest -f || true
# Rebuild Docker image explicitly without cache
docker build --no-cache -t agentic-app:latest .
# Run the Docker container mapping port 7860 correctly
docker run -d -p 7860:7860 --name agentic-app agentic-app:latest
# Wait and verify
sleep 3
docker logs agentic-app
docker ps