Spaces:
Runtime error
Runtime error
Download Dockerfile from ToastAndButter/kamalam-task-api: direct link, hf CLI and curl.
- Browser
- Download file 767 Bytes
-
https://huggingface.co/spaces/ToastAndButter/kamalam-task-api/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/ToastAndButter/kamalam-task-api/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/ToastAndButter/kamalam-task-api/resolve/main/Dockerfile
767 Bytes
| # FROM python:3.10-slim | |
| # WORKDIR /app | |
| # COPY . /app | |
| # RUN pip install --upgrade pip | |
| # RUN pip install -r requirements.txt | |
| # EXPOSE 7860 | |
| # CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] | |
| FROM python:3.10 | |
| # Set up working directory | |
| WORKDIR /code | |
| # Install dependencies | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy app code | |
| COPY . . | |
| # Expose default Streamlit port | |
| EXPOSE 7860 | |
| # Install tmux to run both apps | |
| RUN apt-get update && apt-get install -y tmux | |
| # Run FastAPI backend and Streamlit frontend together | |
| CMD tmux new-session -d "uvicorn app:app --host 0.0.0.0 --port 7861" \; \ | |
| new-window -n streamlit "streamlit run streamlit_app.py --server.port 7860 --server.enableCORS false" \; \ | |
| attach |