Spaces:
Sleeping
Sleeping
Download Dockerfile from abdullah9873/e-comm-flask: direct link, hf CLI and curl.
- Browser
- Download file 753 Bytes
-
https://huggingface.co/spaces/abdullah9873/e-comm-flask/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/abdullah9873/e-comm-flask/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/abdullah9873/e-comm-flask/resolve/main/Dockerfile
753 Bytes
| # Use an official Python runtime as a parent image | |
| FROM python:3.11-slim | |
| # Set the working directory in the container | |
| WORKDIR /app | |
| # Install system dependencies if needed | |
| RUN apt-get update && apt-get install -y \ | |
| build-essential \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Copy the requirements file into the container at /app | |
| COPY requirements.txt . | |
| # Install any needed packages specified in requirements.txt | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy the current directory contents into the container at /app | |
| COPY . . | |
| # Expose port 7860 for the Flask app | |
| EXPOSE 7860 | |
| # Define environment variable | |
| ENV FLASK_APP=app.py | |
| ENV PORT=7860 | |
| # Run app.py when the container launches | |
| CMD ["python", "app.py"] | |