Archisman Karmakar
commited on
Commit
·
fdb492d
1
Parent(s):
2d63da7
Create Dockerfile
Browse files- Dockerfile +25 -0
Dockerfile
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Use a slim Python 3.12 image
|
| 2 |
+
FROM python:3.12-slim
|
| 3 |
+
|
| 4 |
+
# Install any system dependencies (adjust as needed)
|
| 5 |
+
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 6 |
+
build-essential \
|
| 7 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 8 |
+
|
| 9 |
+
# Set the working directory
|
| 10 |
+
WORKDIR /app
|
| 11 |
+
|
| 12 |
+
# Copy dependency files
|
| 13 |
+
COPY requirements.txt .
|
| 14 |
+
|
| 15 |
+
# Upgrade pip and install dependencies
|
| 16 |
+
RUN pip install --upgrade pip && pip install -r requirements.txt
|
| 17 |
+
|
| 18 |
+
# Copy the rest of the app's code
|
| 19 |
+
COPY . .
|
| 20 |
+
|
| 21 |
+
# Expose the port Streamlit uses
|
| 22 |
+
EXPOSE 8501
|
| 23 |
+
|
| 24 |
+
# Command to run your Streamlit app
|
| 25 |
+
CMD ["streamlit", "run", "app_main_hf.py", "--server.enableCORS", "false"]
|