File size: 535 Bytes
f67a585
9353917
f67a585
8d08e7b
f67a585
8d08e7b
f67a585
9353917
fe4c053
8d08e7b
 
2e22948
8d08e7b
f67a585
 
b0d288f
f67a585
 
8d08e7b
 
f67a585
 
9e1e908
f67a585
 
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
# Use an official Python runtime as a parent image
FROM python:3.9

RUN useradd -m -u 1000 user

USER user

ENV PATH="/home/user/.local/bin:$PATH"

# Set the working directory in the container
WORKDIR /app

COPY --chown=user ./requirements.txt requirements.txt

# Install dependencies
RUN pip install --no-cache-dir -r requirements.txt

# Expose the ports for FastAPI (8000) and Streamlit (8501)

COPY --chown=user . /app

# Run FastAPI and Streamlit in parallel
CMD ["uvicorn" ,"api.main:app","--host" ,"0.0.0.0", "--port", "7860"]