pta-text-v0.1 / Dockerfile
gitlost-murali's picture
update Dockerfile to limit user access
27b79c7
raw
history blame
778 Bytes
FROM ubuntu:22.04
# Install system dependencies
RUN apt-get update && apt-get install -y curl git python3 python3-pip && \
curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash && \
apt-get install -y git-lfs
# Install Python dependencies
COPY ./requirements.txt /code/requirements.txt
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
# Create a user, set environment variables, and define work directory
RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
WORKDIR $HOME/app
COPY --chown=user . $HOME/app
# Continue with the rest of the setup
WORKDIR /code
RUN git lfs clone https://huggingface.co/AskUI/pta-text-0.1 /code/model/
COPY . .
CMD ["python3", "app.py"]