Skip to content

Commit

Permalink
more edits to the dockerfiles, fixing the missing uv error
Browse files Browse the repository at this point in the history
  • Loading branch information
Theodlz committed Nov 7, 2024
1 parent d378d99 commit fa17714
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 16 deletions.
17 changes: 9 additions & 8 deletions api.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,26 +1,27 @@
FROM python:3.10

WORKDIR /kowalski

RUN apt-get update && \
apt-get install -y curl && \
curl https://sh.rustup.rs -sSf | sh -s -- -y && \
apt-get install -y build-essential && \
apt-get install -y libssl-dev && \
apt-get install -y libffi-dev && \
apt-get install -y python3-dev && \
apt-get install -y cargo && \
curl -LsSf https://astral.sh/uv/install.sh | sh && \
uv venv env --python=python3.10
apt-get install -y cargo

ENV VIRTUAL_ENV=/usr/local
ENV PATH="/root/.cargo/bin:${PATH}"

# ls the content of /root/.cargo/bin
RUN ls /root/.cargo/bin

WORKDIR /kowalski
SHELL ["/bin/bash", "-c"]

# place to keep our app and the data:
RUN mkdir -p data logs /_tmp

RUN curl -LsSf https://astral.sh/uv/install.sh | sh && \
uv venv env --python=python3.10

COPY requirements/ requirements/

COPY config.defaults.yaml config.defaults.yaml
Expand Down Expand Up @@ -57,4 +58,4 @@ RUN source env/bin/activate && \
uv pip install -r requirements/requirements_test.txt --no-cache-dir

# run container
CMD make run_api
CMD ["/bin/bash", "-c", "source env/bin/activate && make run_api"]
19 changes: 11 additions & 8 deletions ingester.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,23 @@ ARG acai_b_version=d1_dnn_20201130
#RUN apt-get update && apt-get -y install apt-file && apt-file update && apt-get -y install vim && \
# apt-get -y install git && apt-get install -y default-jdk

# place to keep our app and the data:
RUN mkdir -p /kowalski /kowalski/data /kowalski/logs /_tmp /kowalski/models/pgir /kowalski/models/ztf /kowalski/models/wntr /kowalski/models/turbo

WORKDIR /kowalski

# Install jdk, mkdirs, uv, fetch and install Kafka, create virtualenv
RUN apt-get update && apt-get install -y default-jdk && \
wget https://archive.apache.org/dist/kafka/$kafka_version/kafka_$scala_version-$kafka_version.tgz --no-verbose -O kafka_$scala_version-$kafka_version.tgz && \
tar -xzf kafka_$scala_version-$kafka_version.tgz && \
curl -LsSf https://astral.sh/uv/install.sh | sh && \
uv venv env --python=python3.10
tar -xzf kafka_$scala_version-$kafka_version.tgz

ENV VIRTUAL_ENV=/usr/local
ENV PATH="/root/.cargo/bin:${PATH}"

# ls the content of /root/.cargo/bin
RUN ls /root/.cargo/bin
SHELL ["/bin/bash", "-c"]

# place to keep our app and the data:
RUN mkdir -p data logs /_tmp models/pgir models/ztf models/wntr models/turbo

RUN curl -LsSf https://astral.sh/uv/install.sh | sh && \
uv venv env --python=python3.10

# Kafka test-server properties:
COPY server.properties kafka_$scala_version-$kafka_version/config/
Expand Down

0 comments on commit fa17714

Please sign in to comment.