Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +43 -72
Dockerfile
CHANGED
|
@@ -1,72 +1,43 @@
|
|
| 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 |
-
1. **Clone the repository**
|
| 45 |
-
```bash
|
| 46 |
-
git clone https://github.com/YoonJ-C/My-AI-project.git
|
| 47 |
-
cd ai-coaching-assistant
|
| 48 |
-
```
|
| 49 |
-
|
| 50 |
-
2. **Set up environment variables**
|
| 51 |
-
```bash
|
| 52 |
-
cp .env.example .env
|
| 53 |
-
# Add your OpenAI API key and Supabase credentials to .env
|
| 54 |
-
```
|
| 55 |
-
|
| 56 |
-
3. **Install dependencies**
|
| 57 |
-
```bash
|
| 58 |
-
pip install -r requirements.txt
|
| 59 |
-
```
|
| 60 |
-
|
| 61 |
-
4. **Run the application**
|
| 62 |
-
```bash
|
| 63 |
-
python app.py
|
| 64 |
-
# or
|
| 65 |
-
uvicorn main:app --reload
|
| 66 |
-
```
|
| 67 |
-
|
| 68 |
-
5. **Access the app**
|
| 69 |
-
- Open http://localhost:5001 in your browser
|
| 70 |
-
- Start a coaching session and let the AI assist you
|
| 71 |
-
|
| 72 |
-
**Prerequisites:** Python 3.8+, OpenAI API key, Supabase account
|
|
|
|
| 1 |
+
# ================================
|
| 2 |
+
# Vera - AI Coaching Dashboard
|
| 3 |
+
# Streamlit + PyAudio + Whisper
|
| 4 |
+
# ================================
|
| 5 |
+
|
| 6 |
+
# Use an official Python base image
|
| 7 |
+
FROM python:3.10-slim
|
| 8 |
+
|
| 9 |
+
# Set working directory
|
| 10 |
+
WORKDIR /app
|
| 11 |
+
|
| 12 |
+
# Install system dependencies for PyAudio, PortAudio, and audio handling
|
| 13 |
+
RUN apt-get update && apt-get install -y \
|
| 14 |
+
build-essential \
|
| 15 |
+
portaudio19-dev \
|
| 16 |
+
ffmpeg \
|
| 17 |
+
libsndfile1 \
|
| 18 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 19 |
+
|
| 20 |
+
# Copy application files
|
| 21 |
+
COPY . /app
|
| 22 |
+
|
| 23 |
+
# Install Python dependencies
|
| 24 |
+
RUN pip install --no-cache-dir \
|
| 25 |
+
streamlit \
|
| 26 |
+
openai \
|
| 27 |
+
python-dotenv \
|
| 28 |
+
pyaudio \
|
| 29 |
+
transformers \
|
| 30 |
+
torch \
|
| 31 |
+
plotly \
|
| 32 |
+
pandas
|
| 33 |
+
|
| 34 |
+
# (Optional) expose Streamlit’s default port
|
| 35 |
+
EXPOSE 7860
|
| 36 |
+
|
| 37 |
+
# Set environment variable for Streamlit
|
| 38 |
+
ENV STREAMLIT_SERVER_PORT=7860
|
| 39 |
+
ENV STREAMLIT_SERVER_ENABLECORS=false
|
| 40 |
+
ENV STREAMLIT_SERVER_HEADLESS=true
|
| 41 |
+
|
| 42 |
+
# Start the Streamlit app
|
| 43 |
+
CMD ["streamlit", "run", "main.py"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|