smraux's picture
Update Dockerfile to use Conda environment
4484774
raw
history blame
962 Bytes
# Use a base image with Conda installed
FROM continuumio/miniconda3
# Set the working directory in the container
WORKDIR /usr/src/app
# Copy the environment.yml file to the container
COPY environment.yml ./
# Create the Conda environment from the environment.yml file
RUN conda env create -f environment.yml && conda clean -afy
# Activate the environment
SHELL ["conda", "run", "-n", "fooocus", "/bin/bash", "-c"]
# Copy the rest of your application's code
COPY . .
# Install any additional dependencies specified in requirements.txt
# Note: This is only necessary if you have additional pip packages not listed in environment.yml
RUN conda run -n fooocus pip install --no-cache-dir -r requirements.txt
# Make port 80 available to the world outside this container
EXPOSE 80
# Define environment variable (if needed)
ENV NAME World
# Run your application
CMD ["conda", "run", "-n", "fooocus", "python", "./entry_with_update.py", "--preset", "realistic"]