Spaces:
Running
Running
NaikPriyank
commited on
Update Dockerfile
Browse files- Dockerfile +35 -35
Dockerfile
CHANGED
@@ -1,35 +1,35 @@
|
|
1 |
-
# Use the official Python 3.10 slim image as the base
|
2 |
-
FROM python:3.10-slim
|
3 |
-
|
4 |
-
# Set environment variables
|
5 |
-
ENV PYTHONDONTWRITEBYTECODE=1
|
6 |
-
ENV PYTHONUNBUFFERED=1
|
7 |
-
|
8 |
-
# Set the working directory in the container
|
9 |
-
WORKDIR /app
|
10 |
-
|
11 |
-
# Copy the requirements file into the container
|
12 |
-
COPY requirements.txt /app/
|
13 |
-
|
14 |
-
# Install system dependencies
|
15 |
-
RUN apt-get update && apt-get install -y \
|
16 |
-
gcc \
|
17 |
-
&& rm -rf /var/lib/apt/lists/*
|
18 |
-
|
19 |
-
# Install Python dependencies
|
20 |
-
RUN pip install --upgrade pip \
|
21 |
-
&& pip install --no-cache-dir -r requirements.txt
|
22 |
-
|
23 |
-
# Copy the application code into the container
|
24 |
-
COPY . /app/
|
25 |
-
|
26 |
-
# Expose the port Streamlit will run on
|
27 |
-
EXPOSE 8501
|
28 |
-
|
29 |
-
# Set Streamlit's configuration to run on all interfaces
|
30 |
-
ENV STREAMLIT_SERVER_ENABLECORS=false
|
31 |
-
ENV STREAMLIT_SERVER_ENABLEWEBBROWSER=false
|
32 |
-
ENV STREAMLIT_SERVER_PORT=8501
|
33 |
-
|
34 |
-
# Run the Streamlit app
|
35 |
-
CMD ["streamlit", "run", "genAI.py", "--server.port=
|
|
|
1 |
+
# Use the official Python 3.10 slim image as the base
|
2 |
+
FROM python:3.10-slim
|
3 |
+
|
4 |
+
# Set environment variables
|
5 |
+
ENV PYTHONDONTWRITEBYTECODE=1
|
6 |
+
ENV PYTHONUNBUFFERED=1
|
7 |
+
|
8 |
+
# Set the working directory in the container
|
9 |
+
WORKDIR /app
|
10 |
+
|
11 |
+
# Copy the requirements file into the container
|
12 |
+
COPY requirements.txt /app/
|
13 |
+
|
14 |
+
# Install system dependencies
|
15 |
+
RUN apt-get update && apt-get install -y \
|
16 |
+
gcc \
|
17 |
+
&& rm -rf /var/lib/apt/lists/*
|
18 |
+
|
19 |
+
# Install Python dependencies
|
20 |
+
RUN pip install --upgrade pip \
|
21 |
+
&& pip install --no-cache-dir -r requirements.txt
|
22 |
+
|
23 |
+
# Copy the application code into the container
|
24 |
+
COPY . /app/
|
25 |
+
|
26 |
+
# Expose the port Streamlit will run on
|
27 |
+
EXPOSE 8501
|
28 |
+
|
29 |
+
# Set Streamlit's configuration to run on all interfaces
|
30 |
+
ENV STREAMLIT_SERVER_ENABLECORS=false
|
31 |
+
ENV STREAMLIT_SERVER_ENABLEWEBBROWSER=false
|
32 |
+
ENV STREAMLIT_SERVER_PORT=8501
|
33 |
+
|
34 |
+
# Run the Streamlit app
|
35 |
+
CMD ["streamlit", "run", "genAI.py", "--server.port=7860"]
|