Download Dockerfile from Fabio76/dify: direct link, hf CLI and curl.
- Browser
- Download file 1.07 kB
-
https://huggingface.co/spaces/Fabio76/dify/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Fabio76/dify/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Fabio76/dify/resolve/main/Dockerfile
1.07 kB
| # Use the official Python image | |
| FROM python:3.10-slim | |
| # Set the working directory in the container | |
| WORKDIR /app | |
| # Install system dependencies | |
| RUN apt-get update && apt-get install -y \ | |
| build-essential \ | |
| libpq-dev \ | |
| curl \ | |
| git \ | |
| && apt-get clean \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Copy the requirements file and install Python dependencies | |
| COPY requirements.txt /app/ | |
| RUN pip install --no-cache-dir -r /app/requirements.txt | |
| # Create a subdirectory for the Dify repository | |
| RUN mkdir /app/dify | |
| # Clone the Dify repository into the subdirectory | |
| RUN git clone https://github.com/langgenius/dify.git /app/dify | |
| # Set the working directory to the cloned repository | |
| WORKDIR /app/dify | |
| # Expose port 80 to the outside world | |
| EXPOSE 80 | |
| # Define environment variables for database and other services | |
| ENV POSTGRES_USER=postgres | |
| ENV POSTGRES_PASSWORD=example | |
| ENV POSTGRES_DB=dify | |
| ENV REDIS_HOST=redis | |
| ENV WEAVIATE_HOST=weaviate | |
| # Start the application | |
| CMD ["python", "api/app.py"] # Update this line to the correct start command for your application | |