Spaces:
Sleeping
Sleeping
Download Dockerfile from sreepathi-ravikumar/fastprogram: direct link, hf CLI and curl.
- Browser
- Download file 757 Bytes
-
https://huggingface.co/spaces/sreepathi-ravikumar/fastprogram/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/sreepathi-ravikumar/fastprogram/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/sreepathi-ravikumar/fastprogram/resolve/main/Dockerfile
757 Bytes
| FROM python:3.11-slim | |
| # Install system dependencies | |
| RUN apt-get update && apt-get install -y \ | |
| curl build-essential python3-dev \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Install Rust | |
| RUN curl https://sh.rustup.rs -sSf | bash -s -- -y | |
| ENV PATH="/root/.cargo/bin:${PATH}" | |
| # Install maturin | |
| RUN pip install maturin | |
| # Set working directory | |
| WORKDIR /app | |
| # Copy your project files (including app.py and requirements.txt) | |
| COPY . . | |
| # Install Python dependencies | |
| RUN pip install -r requirements.txt | |
| # Build Rust extension | |
| RUN maturin build --release --manifest-path sample_rust/Cargo.toml | |
| # Install the generated wheel | |
| RUN pip install sample_rust/target/wheels/*.whl | |
| # Expose port Hugging Face uses | |
| EXPOSE 7860 | |
| # Start the Flask app | |
| CMD ["python3", "app.py"] |