File size: 854 Bytes
0a9a7a1
 
981d587
0a9a7a1
 
981d587
0a9a7a1
 
981d587
0a9a7a1
 
981d587
0a9a7a1
 
981d587
 
 
 
 
 
 
0a9a7a1
 
981d587
0a9a7a1
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
FROM python:3.9

# Create a new user 'user' with user id 1000
RUN useradd -m -u 1000 user

# Set the working directory to /app
WORKDIR /app

# Copy the requirements.txt file into the container at /app/requirements.txt
COPY --chown=user ./requirements.txt requirements.txt

# Install the Python dependencies from requirements.txt
RUN pip install --no-cache-dir --upgrade -r requirements.txt

# Install wget to ensure the next RUN command works
RUN apt-get update && apt-get install -y wget && rm -rf /var/lib/apt/lists/*

# Download the model file using wget
RUN wget https://huggingface.co/Ahmed007/chest_xray/resolve/main/model.h5 -O model.h5 && chown user:user model.h5

# Copy the current directory into the container at /app
COPY --chown=user . /app

# Command to run the application
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]