init
This commit is contained in:
41
Dockerfile
Normal file
41
Dockerfile
Normal file
@@ -0,0 +1,41 @@
|
||||
FROM node:18
|
||||
|
||||
# Install Python and required dependencies
|
||||
RUN apt-get update && apt-get install -y \
|
||||
python3 \
|
||||
python3-pip \
|
||||
python3-dev \
|
||||
python3-venv \
|
||||
build-essential \
|
||||
libsndfile1 \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Copy Python requirements and install in virtual environment
|
||||
COPY requirements.txt ./
|
||||
RUN python3 -m venv /opt/venv
|
||||
ENV PATH="/opt/venv/bin:$PATH"
|
||||
RUN pip install -r requirements.txt
|
||||
|
||||
# Copy package files
|
||||
COPY package.json yarn.lock* ./
|
||||
COPY .yarnrc ./
|
||||
|
||||
# Install Node.js dependencies
|
||||
RUN yarn install --frozen-lockfile
|
||||
|
||||
# Copy application code
|
||||
COPY . .
|
||||
|
||||
# Make Python script executable
|
||||
RUN chmod +x speech_processor.py
|
||||
|
||||
# Expose port
|
||||
EXPOSE 3000
|
||||
|
||||
# Ensure virtual environment is active for runtime
|
||||
ENV PATH="/opt/venv/bin:$PATH"
|
||||
|
||||
# Start the application
|
||||
CMD ["yarn", "start"]
|
||||
Reference in New Issue
Block a user