akash015 commited on
Commit
87161aa
·
verified ·
1 Parent(s): 0a5c7ec

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +28 -0
Dockerfile ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use the official Python 3.10 image from the Docker Hub
2
+ FROM python:3.10
3
+
4
+ # Install necessary system dependencies
5
+ RUN apt-get update && apt-get install -y \
6
+ libgl1-mesa-glx \
7
+ && rm -rf /var/lib/apt/lists/*
8
+
9
+ # Create a new user and set permissions
10
+ RUN useradd -m -u 1000 user
11
+ USER user
12
+
13
+ # Set environment variables
14
+ ENV HOME=/home/user \
15
+ PATH=/home/user/.local/bin:$PATH
16
+
17
+ # Set the working directory
18
+ WORKDIR $HOME/app
19
+
20
+ # Copy the requirements file and install dependencies
21
+ COPY --chown=user requirements.txt $HOME/app/requirements.txt
22
+ RUN pip install --no-cache-dir -r requirements.txt
23
+
24
+ # Copy the rest of the application code
25
+ COPY --chown=user . .
26
+
27
+ # Define the command to run your Chainlit application
28
+ CMD ["chainlit", "run", "app.py", "--port", "7860"]