updated to video upload
This commit is contained in:
21
Dockerfile
21
Dockerfile
@@ -1,4 +1,4 @@
|
||||
# Use the official Python image from the Docker Hub
|
||||
# Stage 1: Build stage
|
||||
FROM python:3.11-slim AS build
|
||||
|
||||
# Set the working directory in the container
|
||||
@@ -11,6 +11,7 @@ RUN apt-get update && apt-get install -y \
|
||||
libssl-dev \
|
||||
python3-dev \
|
||||
cargo \
|
||||
g++ \
|
||||
curl \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
@@ -30,17 +31,25 @@ FROM python:3.11-slim
|
||||
# Set the working directory in the container
|
||||
WORKDIR /app
|
||||
|
||||
# Copy only the necessary files from the build stage
|
||||
COPY --from=build /app /app
|
||||
COPY --from=build /root/.cargo /root/.cargo
|
||||
|
||||
# Install runtime dependencies
|
||||
RUN apt-get update && apt-get install -y \
|
||||
libffi-dev \
|
||||
libssl-dev \
|
||||
g++ \
|
||||
curl \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Install Gunicorn
|
||||
# Install Rust
|
||||
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
||||
ENV PATH="/root/.cargo/bin:${PATH}"
|
||||
|
||||
# Copy only the necessary files from the build stage
|
||||
COPY --from=build /app /app
|
||||
COPY --from=build /root/.cargo /root/.cargo
|
||||
|
||||
# Install Gunicorn and other Python dependencies
|
||||
COPY requirements.txt .
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
RUN pip install gunicorn
|
||||
|
||||
# Make port 5000 available to the world outside this container
|
||||
|
||||
Reference in New Issue
Block a user