Spaces:
Runtime error
Runtime error
Download Dockerfile from RasoulSahibzadah/Machine-Learning-MLflow: direct link, hf CLI and curl.
- Browser
- Download file 705 Bytes
-
https://huggingface.co/spaces/RasoulSahibzadah/Machine-Learning-MLflow/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/RasoulSahibzadah/Machine-Learning-MLflow/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/RasoulSahibzadah/Machine-Learning-MLflow/resolve/main/Dockerfile
705 Bytes
| FROM python:3.8-slim-buster | |
| # Install necessary packages | |
| RUN apt update -y && apt install awscli -y | |
| # Create a non-root user to avoid running as root | |
| RUN useradd -m appuser | |
| # Set working directory | |
| WORKDIR /app | |
| # Ensure the /app/logs directory exists and set the correct permissions | |
| RUN mkdir -p /app/logs && chmod -R 777 /app/logs | |
| # Copy the local files into the container's working directory | |
| COPY . /app | |
| # Change ownership of the application and logs directory to the non-root user | |
| RUN chown -R appuser:appuser /app /app/logs | |
| # Install Python dependencies | |
| RUN pip install -r requirements.txt | |
| # Switch to the non-root user | |
| USER appuser | |
| # Command to run your application | |
| CMD ["python3", "app.py"] | |