-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
36 lines (25 loc) · 945 Bytes
/
Dockerfile
File metadata and controls
36 lines (25 loc) · 945 Bytes
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
FROM mambaorg/micromamba:1.4.9
# Set working directory
WORKDIR /app
# Copy and install environment
COPY environment.yaml /tmp/environment.yaml
RUN micromamba install -y -n base --file /tmp/environment.yaml && \
micromamba clean --all --yes
USER root
RUN apt-get update && apt-get install ffmpeg libsm6 libxext6 -y
# libgl1 is required for OpenCV to work properly, needed for unstructured[PDF] parsing
# RUN apt-get update && apt-get install -y libgl1
# Add HOST setting to activation script
RUN echo 'export HOST=0.0.0.0' >> /usr/local/bin/_activate_current_env.sh
USER $MAMBA_USER
# Activate environment for following commands
SHELL ["micromamba", "run", "-n", "base", "/bin/bash", "-c"]
# Copy your application code
COPY . ./
# Set environment variables
ENV HOST=0.0.0.0
ENV DASH_HOST=0.0.0.0
# Expose the application port
EXPOSE 8050
# Run the application
CMD ["uvicorn", "api.main:app", "--host", "0.0.0.0", "--port", "8050"]