test / Dockerfile
navpan2's picture
Update Dockerfile
dd4c9f9 verified
raw
history blame
797 Bytes
# Pull python 3.6.8 docker image
FROM python:3.6.8
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
# Create necessary directories
RUN mkdir -p /home/app/staticfiles/app/uploaded_videos/
WORKDIR /app
# Install Rust and Cargo
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y
ENV PATH="/root/.cargo/bin:$PATH"
# Copy requirements and install dependencies
COPY ./requirements.txt /app/requirements.txt
# RUN pip install --upgrade pip
RUN pip install cmake
RUN pip install opencv-python==4.2.0.32
RUN pip install -r requirements.txt
# Copy application files
COPY . /app
RUN python manage.py collectstatic --noinput
RUN pip install gunicorn
# Create uploaded videos directory
RUN mkdir -p /app/uploaded_videos /app/uploaded_videos/
VOLUME /app/run/
ENTRYPOINT ["/app/bin/gunicorn_start.sh"]