CoolFace
Apppublic

alonsosilva/tokenizer

sourceHugging Facemitupdated 9mo agoView on Hugging Face
4likes
Dockerfile29 linesDownload Raw Back to root
1FROM python:3.112 3# Set up a new user named "user" with user ID 10004RUN useradd -m -u 1000 user5 6# Switch to the "user" user7USER user8 9# Set home to the user's home directory10ENV HOME=/home/user \11	PATH=/home/user/.local/bin:$PATH12 13# Set the working directory to the user's home directory14WORKDIR $HOME/app15 16# Try and run pip command after setting the user with `USER user` to avoid permission issues with Python17RUN pip install --no-cache-dir --upgrade pip18 19# Copy the current directory contents into the container at $HOME/app setting the owner to the user20COPY --chown=user . $HOME/app21 22COPY --chown=user requirements.txt .23 24RUN pip install --no-cache-dir --upgrade -r requirements.txt25 26COPY --chown=user app.py .27 28ENTRYPOINT ["solara", "run", "app.py", "--host=0.0.0.0", "--port", "7860"]29