Spaces:
Sleeping
Sleeping
Download Dockerfile from rmz0312/text2text_Docker: direct link, hf CLI and curl.
- Browser
- Download file 875 Bytes
-
https://huggingface.co/spaces/rmz0312/text2text_Docker/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/rmz0312/text2text_Docker/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/rmz0312/text2text_Docker/resolve/main/Dockerfile
875 Bytes
| #python image with version 3.9 | |
| FROM python:3.9 | |
| #set the working directory to /code | |
| WORKDIR /code | |
| #copy the requirements.txt file to the working directory | |
| COPY ./requirements.txt /code/requirements.txt | |
| #install the dependencies from the requirements.txt file | |
| RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt | |
| #Set up a new user named "user" | |
| RUN useradd user | |
| #Switch to the new user | |
| USER user | |
| #set home to the users home directory | |
| ENV HOME=/home/user \ | |
| #Set the path to the users home directory | |
| PATH=/home/user/.local/bin:$PATH | |
| #set the working directory to the users home directory | |
| WORKDIR $HOME/app | |
| #Copy the contents of the current directory to the users home directory and set the ownership to the user | |
| COPY --chown=user . $HOME/app | |
| #Start the FAST API App on port 7860 | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] | |