Spaces:
Runtime error
Runtime error
Download Dockerfile from WebashalarForML/ImageDataExtractor3: direct link, hf CLI and curl.
- Browser
- Download file 940 Bytes
-
https://huggingface.co/spaces/WebashalarForML/ImageDataExtractor3/resolve/0666221fa74ff0de98ced8cfc24f8cb5031009da/Dockerfile
- Command line
-
hf download hf://spaces/WebashalarForML/ImageDataExtractor3@0666221fa74ff0de98ced8cfc24f8cb5031009da/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/WebashalarForML/ImageDataExtractor3/resolve/0666221fa74ff0de98ced8cfc24f8cb5031009da/Dockerfile
940 Bytes
| # Use an official Python runtime as a parent image | |
| FROM python:3.9 | |
| # Create a non-root user with a home directory | |
| RUN useradd -m -u 1000 user | |
| # Set the user to the non-root user | |
| USER user | |
| # Add the user's local bin to the PATH | |
| ENV PATH="/home/user/.local/bin:$PATH" | |
| # Set the working directory to /app | |
| WORKDIR /app | |
| # Copy the requirements.txt file and install any dependencies | |
| COPY --chown=user ./requirements.txt /app/requirements.txt | |
| RUN pip install --no-cache-dir --upgrade -r /app/requirements.txt | |
| # Copy the current directory contents into the container at /app | |
| COPY --chown=user . /app | |
| # Create the folders for uploads and results with appropriate permissions | |
| RUN mkdir -p /app/static/uploads /app/static/results && \ | |
| chmod -R 755 /app/static/uploads /app/static/results | |
| # Expose the port the app will run on | |
| EXPOSE 7860 | |
| # Run the Flask app using uvicorn | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] | |