Spaces:
Runtime error
Runtime error
File size: 1,462 Bytes
7bcad38 f32ea8f 7bcad38 fd1d1a5 7bcad38 12c2c07 a651f3e 7bcad38 a651f3e 7bcad38 a651f3e 7bcad38 315ecab |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
# FROM python:3.9
# FROM node:19-slim
# RUN apt-get update && \
# apt-get install -y \
# bash \
# git git-lfs \
# wget curl procps \
# htop vim nano && \
# rm -rf /var/lib/apt/lists/*
# # RUN useradd -m -u 1000 user
# # USER user
# # ENV HOME=/home/user \
# # PATH=/home/user/.local/bin:$PATH
# WORKDIR /app
# COPY --link ./ /app
# RUN chown 1000 /app
# USER 1000
# # COPY --chown=user . $HOME/app
# # COPY ./requirements.txt ~/app/requirements.txt
# RUN pip install -r requirements.txt
# # COPY . .
# CMD ["chainlit", "run", "chain_app.py", "--port", "7860" ,"-h"]
# Start from a Python base image
FROM python:3.9
# Install necessary packages
RUN apt-get update && \
apt-get install -y \
bash \
git git-lfs \
wget curl procps \
htop vim nano && \
rm -rf /var/lib/apt/lists/*
# Create a new user
RUN useradd -m -u 1000 user
# Set environment variables
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
# Set working directory
WORKDIR /app
# Copy the application files
COPY ./ /app
# Change ownership of the application files
RUN chown -R user:user /app
# Switch to the new user
USER user
# Copy and install Python dependencies
COPY --chown=user:user requirements.txt $HOME/app/requirements.txt
RUN pip install --no-cache-dir -r $HOME/app/requirements.txt
# Set the command to run the application
CMD ["chainlit", "run", "chain_app.py", "-w", "--port", "7860" ,"-h"]
|