Spaces:
Sleeping
Sleeping
File size: 805 Bytes
cee9e7e 14dd32c f59c7c7 cee9e7e 9f32659 cee9e7e 41c36a3 cee9e7e 10c3735 cee9e7e 10c3735 9f32659 cee9e7e 10c3735 d1b64db 10c3735 d8f499e 10c3735 9f32659 6690f2a 5e2fa16 d1b64db | 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 37 38 39 40 | FROM python:3.12-slim
ENV AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID
ENV AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY
# use root account
USER root
#Install the gears
RUN apt-get update -y
RUN apt-get install nano unzip curl -y
RUN apt-get update && apt-get install -y \
build-essential \
curl \
&& rm -rf /var/lib/apt/lists/*
# create user account
RUN useradd -m -u 1000 user
# RUN useradd -ms /bin/bash user
RUN mkdir /app
RUN chown -R user /app
# use user account
USER user
ENV HOME=/app\
PATH=/app/.local/bin:$PATH
WORKDIR /app
COPY ./requirements.txt requirements.txt
RUN pip install --no-cache-dir --upgrade -r requirements.txt
COPY --chown=user . /app
#CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
EXPOSE $PORT
CMD fastapi run app.py --port $PORT --reload
|