-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathDockerfile
More file actions
35 lines (29 loc) · 811 Bytes
/
Dockerfile
File metadata and controls
35 lines (29 loc) · 811 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
# Use an official Python image as a base image
FROM python:3.9-slim
# Set environment variables to prevent Python from writing .pyc files and to prevent buffering
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
# Set the working directory in the container
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y \
build-essential \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Install Python dependencies
RUN pip install --no-cache-dir \
pandas \
scikit-learn \
torch \
torchvision \
seaborn \
fastapi \
uvicorn \
jupyterlab \
tensorflow \
python-multipart \
torchsummary
# Expose FastAPI default port
EXPOSE 8000 8888
# Default command to run interactive bash
CMD ["bash"]