leodeveloper2000/youtubetranslationapi
1
1## Use the official Python 3.9 image2FROM python:3.93 4## set the working directory to /code5WORKDIR /code6 7## Copy the current directory contents in the container at /code8COPY ./requirements.txt /code/requirements.txt9 10## Install the requirements.txt11RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt12 13# Set up a new user named "user" 14RUN useradd user15# Switch to the "user" user16USER user17 18# Set home to the user's home directory19 20ENV HOME=/home/user \21 PATH=/home/user/.local/bin:$PATH22 23# Set the working directory to the user's home directory24WORKDIR $HOME/app25 26# Copy the current directory contents into the container at $HOME/app setting the owner to the user27COPY --chown=user . $HOME/app28 29## Start the FASTAPI App on port 786030CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]31 