Spaces:
Sleeping
Sleeping
Download Dockerfile from vinay0123/travis_login: direct link, hf CLI and curl.
- Browser
- Download file 827 Bytes
-
https://huggingface.co/spaces/vinay0123/travis_login/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/vinay0123/travis_login/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/vinay0123/travis_login/resolve/main/Dockerfile
827 Bytes
| FROM python:3.9-slim | |
| WORKDIR /app | |
| # Install system dependencies | |
| RUN apt-get update && apt-get install -y \ | |
| libgl1 \ | |
| libglib2.0-0 \ | |
| libsm6 \ | |
| libxext6 \ | |
| libxrender-dev \ | |
| libgomp1 \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Create app user and necessary directories with proper permissions | |
| RUN useradd -m -u 1000 appuser && \ | |
| mkdir -p /tmp/app_data && \ | |
| chmod -R 777 /tmp/app_data && \ | |
| chown -R appuser:appuser /app /tmp/app_data | |
| # Copy requirements and install Python dependencies | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy application code | |
| COPY . . | |
| # Set proper ownership for app directory | |
| RUN chown -R appuser:appuser /app | |
| # Expose port | |
| EXPOSE 7860 | |
| # Switch to non-root user | |
| USER appuser | |
| # Run the application using Python | |
| CMD ["python", "app.py"] | |