forked from millicentaumaomondi/medicalsegmentation
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
24 lines (17 loc) · 699 Bytes
/
Dockerfile
File metadata and controls
24 lines (17 loc) · 699 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
FROM python:3.11.5
# Install dependencies needed for certain libraries (optional, based on your project)
RUN apt-get update && apt-get install -y \
libgl1-mesa-glx \
libglib2.0-0 \
&& rm -rf /var/lib/apt/lists/*
# Set the working directory inside the container
WORKDIR /code
# Copy requirements.txt and install dependencies
COPY ./requirements.txt /code/requirements.txt
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
# Copy the rest of the application code to the container
COPY ./ /code/
# Expose port 8000 for FastAPI
EXPOSE 8000
# Command to run the FastAPI app using Uvicorn on port 8000
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]