Skip to content

Commit

Permalink
Merge pull request #45 from daisybio/new_dockerfile
Browse files Browse the repository at this point in the history
changed Dockerfile to using conda with custom base image
  • Loading branch information
strasserle authored Dec 19, 2024
2 parents b6e39fd + a5757d4 commit 447ec8c
Showing 1 changed file with 9 additions and 22 deletions.
31 changes: 9 additions & 22 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,32 +1,19 @@
FROM python:3.12.6-bullseye

# Install required packages using apt
# RUN apt-get update && apt-get install -y \
# libmariadb3 libmariadb-dev build-essential linux-headers-amd64 mariadb-connector-c \
# && rm -rf /var/lib/apt/lists/*
FROM community.wave.seqera.io/library/bioconductor-gsva_bioconductor-sponge_gunicorn_python_pruned:e9c5176f69f5398d

# Install required system dependencies for MySQL, R, and Conda
RUN apt-get update && apt-get install -y \
default-mysql-client default-libmysqlclient-dev build-essential linux-headers-amd64 \
default-mysql-client pkg-config default-libmysqlclient-dev build-essential \
&& rm -rf /var/lib/apt/lists/*

# Upgrade pip
RUN pip3 install --upgrade pip

# Install Python dependencies
WORKDIR /server
COPY . /server

RUN pip3 --no-cache-dir install -r requirements.txt
RUN pip install debugpy
COPY requirements.txt /server/requirements.txt
RUN micromamba run pip install --no-cache-dir -r requirements.txt

# Copy application code
COPY . /server

# the mariadb plugin directory seems to be misconfigured
# bei default. In order to work properly we manually adjust
# the path.
# ENV MARIADB_PLUGIN_DIR /usr/lib/mariadb/plugin

# EXPOSE 5000
# CMD ["python3", "server.py"]

#run the command to start uWSGI
# Start the application using gunicorn with UvicornWorker
CMD ["gunicorn", "-k", "uvicorn.workers.UvicornWorker", "-b", "0.0.0.0:5000", "-w", "4", "server:connex_app"]

0 comments on commit 447ec8c

Please sign in to comment.