Skip to content

Commit

Permalink
Apply dockerfile adjustment for aws ecs
Browse files Browse the repository at this point in the history
  • Loading branch information
tienday committed Sep 11, 2024
1 parent 405a67e commit 9ca2377
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 7 deletions.
17 changes: 13 additions & 4 deletions studio/config/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@ WORKDIR /app

# install default packages
RUN apt-get --allow-releaseinfo-change update && \
apt-get install --no-install-recommends -y sudo procps iproute2 iputils-ping less vim
apt-get install --no-install-recommends -y sudo procps iproute2 iputils-ping wget unzip less vim

# install conda & packages
RUN mkdir -p /opt/miniconda3 && \
apt-get install --no-install-recommends -y gcc g++ libgl1 libgl1-mesa-dev libopencv-dev wget && \
apt-get install --no-install-recommends -y gcc g++ libgl1 libgl1-mesa-dev libopencv-dev && \
wget -q https://repo.anaconda.com/miniconda/Miniconda3-py39_4.12.0-Linux-x86_64.sh -O /opt/miniconda3/miniconda.sh && \
apt-get purge wget -y && apt-get autoremove -y && apt-get clean && \
bash /opt/miniconda3/miniconda.sh -b -u -p /opt/miniconda3 && \
rm /opt/miniconda3/miniconda.sh && \
export PATH="$PATH:/opt/miniconda3/bin" && \
Expand All @@ -19,6 +18,16 @@ RUN mkdir -p /opt/miniconda3 && \
conda clean -y --tarballs
ENV PATH $PATH:/opt/miniconda3/bin

# install aws packages
RUN cd /tmp && \
wget https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip && \
unzip awscli-exe-linux-x86_64.zip && \
sh ./aws/install

# cleaning apt
RUN apt-get purge wget -y && \
apt-get autoremove -y && apt-get clean

# setup user profile
RUN echo 'alias ll="ls -la --color=auto"' >> /root/.bashrc && \
echo 'set nu ic hls nowrap ts=4 sw=4 | syntax on' >> /root/.vimrc
Expand All @@ -34,6 +43,6 @@ RUN poetry install --no-root
COPY frontend/build /app/frontend/build
COPY studio /app/studio
COPY sample_data /app/sample_data
COPY main.py ./
COPY main.py alembic.ini ./

EXPOSE 8000
15 changes: 12 additions & 3 deletions studio/config/docker/Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@ WORKDIR /app

# install default packages
RUN apt-get --allow-releaseinfo-change update && \
apt-get install --no-install-recommends -y sudo procps iproute2 iputils-ping less vim
apt-get install --no-install-recommends -y sudo procps iproute2 iputils-ping wget unzip less vim

# install conda & packages
RUN mkdir -p /opt/miniconda3 && \
apt-get install --no-install-recommends -y gcc g++ libgl1 libgl1-mesa-dev libopencv-dev wget && \
apt-get install --no-install-recommends -y gcc g++ libgl1 libgl1-mesa-dev libopencv-dev && \
wget -q https://repo.anaconda.com/miniconda/Miniconda3-py39_4.12.0-Linux-x86_64.sh -O /opt/miniconda3/miniconda.sh && \
apt-get purge wget -y && apt-get autoremove -y && apt-get clean && \
bash /opt/miniconda3/miniconda.sh -b -u -p /opt/miniconda3 && \
rm /opt/miniconda3/miniconda.sh && \
export PATH="$PATH:/opt/miniconda3/bin" && \
Expand All @@ -19,6 +18,16 @@ RUN mkdir -p /opt/miniconda3 && \
conda clean -y --tarballs
ENV PATH $PATH:/opt/miniconda3/bin

# install aws packages
RUN cd /tmp && \
wget https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip && \
unzip awscli-exe-linux-x86_64.zip && \
sh ./aws/install

# cleaning apt
RUN apt-get purge wget -y && \
apt-get autoremove -y && apt-get clean

# setup user profile
RUN echo 'alias ll="ls -la --color=auto"' >> /root/.bashrc && \
echo 'set nu ic hls nowrap ts=4 sw=4 | syntax on' >> /root/.vimrc
Expand Down

0 comments on commit 9ca2377

Please sign in to comment.