Spaces:
Sleeping
Sleeping
Upload Dockerfile with huggingface_hub
Browse files- Dockerfile +22 -0
Dockerfile
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Use the official Python image as a base image
|
| 2 |
+
FROM python:3.12.4
|
| 3 |
+
|
| 4 |
+
# Set the working directory in the container
|
| 5 |
+
WORKDIR /smartcat
|
| 6 |
+
|
| 7 |
+
# Copy the current directory contents into the container
|
| 8 |
+
COPY . /smartcat
|
| 9 |
+
|
| 10 |
+
# Install any needed dependencies specified in requirements.txt
|
| 11 |
+
RUN pip install --upgrade pip
|
| 12 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
| 13 |
+
|
| 14 |
+
EXPOSE 8000 8501
|
| 15 |
+
|
| 16 |
+
ENV PYTHONUNBUFFERED=1 \
|
| 17 |
+
PYTHONDONTWRITEBYTECODE=1
|
| 18 |
+
|
| 19 |
+
# CMD ["uvicorn", "scripts.api:app", "--host", "0.0.0.0", "--port", "8000", "--log-level", "debug"]
|
| 20 |
+
|
| 21 |
+
# Command to start FastAPI and Streamlit
|
| 22 |
+
CMD ["bash", "-c", "uvicorn scripts.api:app --host 0.0.0.0 --port 8000 & streamlit run app.py --server.port=8501 --server.address=0.0.0.0"]
|