CoolFace
Apppublic

Krishna2903/crypto

sourceHugging Faceopenrailupdated 2y agoView on Hugging Face
0likes
Dockerfile31 linesDownload Raw Back to root
1# Use Python 3.10.12 as the base image
2FROM python:3.9.13
3
4# Set the working directory to /code
5WORKDIR /code
6
7# Copy the requirements file into the container at /code/requirements.txt
8COPY ./requirements.txt /code/requirements.txt
9
10# Upgrade pip and install the dependencies
11RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
12
13# Create a non-root user with UID 1000
14RUN useradd -m -u 1000 user
15
16# Switch to the non-root user
17USER user
18
19# Set environment variables for the user
20ENV HOME=/home/user \
21    PATH=/home/user/.local/bin:$PATH
22
23# Set the working directory for the application
24WORKDIR $HOME/app
25
26# Copy the local code into the container at /home/user/app
27COPY --chown=user . $HOME/app
28
29# Specify the command to run on container start
30CMD ["streamlit", "run", "app.py","--server.port","7860"]
31