File size: 1,184 Bytes
4484774
 
3f1052e
a76d84b
 
 
7b34067
 
3f1052e
8e6e886
 
84302d0
8e6e886
 
84302d0
4484774
 
869dccb
4484774
7b34067
3f1052e
4484774
8e6e886
ec5514a
3f1052e
7b34067
 
3f1052e
4484774
7b34067
46f1422
 
 
3f1052e
4484774
a76d84b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# Use a base image with Conda installed
FROM continuumio/miniconda3

# Install the missing library
RUN apt-get update && apt-get install -y libgl1-mesa-glx && rm -rf /var/lib/apt/lists/*

# Set the working directory in the container
WORKDIR /usr/src/app

# Copy the environment.yaml file to the container
COPY environment.yaml ./

# Create the Conda environment from the environment.yaml file
RUN conda env create -f environment.yaml && 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.yaml
RUN conda run -n fooocus pip3 install -r requirements_versions.txt

# Make port 80 available to the world outside this container
EXPOSE 80

# Define environment variable (if needed)
ENV NAME World

# Provide access to outputs and models
RUN mkdir -p /usr/src/app/outputs && chmod -R 777 /usr/src/app

# Run your application
CMD ["conda", "run", "-n", "fooocus", "python3", "./entry_with_update.py", "--preset", "realistic"]