forked from lllyasviel/ControlNet
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
22 lines (16 loc) · 736 Bytes
/
Copy pathDockerfile
File metadata and controls
22 lines (16 loc) · 736 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Use Miniconda as the base image
FROM continuumio/miniconda3:latest
# Set the working directory in the container
WORKDIR /app
# Copy the environment file and application code to the container
COPY environment.yaml /app/environment.yaml
COPY . /app
# Create the Conda environment
RUN conda env create -f environment.yaml
# Activate the environment and ensure it is used by default
RUN echo "conda activate $(head -n 1 environment.yaml | cut -d' ' -f2)" >> ~/.bashrc
ENV PATH /opt/conda/envs/$(head -n 1 environment.yaml | cut -d' ' -f2)/bin:$PATH
# Expose the port your FastAPI app will run on (e.g., 8000)
EXPOSE 8000
# Command to run your application
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000", "--reload"]